Binpkg: fix os.path.dirname() usage
authorZac Medico <zmedico@gentoo.org>
Sat, 10 Dec 2011 03:31:20 +0000 (19:31 -0800)
committerZac Medico <zmedico@gentoo.org>
Sat, 10 Dec 2011 03:31:20 +0000 (19:31 -0800)
It doesn't behave as intended for $ED which has a trailing slash.

pym/_emerge/Binpkg.py

index 5a58ad288e9858ee806f01cc4857c5bd509e543f..57b170f53c58e9a4ea08cbc166993dcd626c05d6 100644 (file)
@@ -354,7 +354,7 @@ class Binpkg(CompositeTask):
                os.rename(os.path.join(self.settings["D"],
                        self._build_prefix.lstrip(os.sep)), image_tmp_dir)
                shutil.rmtree(self._image_dir)
-               ensure_dirs(os.path.dirname(self.settings["ED"]))
+               ensure_dirs(os.path.dirname(self.settings["ED"].rstrip(os.sep)))
                os.rename(image_tmp_dir, self.settings["ED"])
 
                self.wait()