Fix Atom.with_repo() bugs.
authorZac Medico <zmedico@gentoo.org>
Fri, 23 Sep 2011 01:54:52 +0000 (18:54 -0700)
committerZac Medico <zmedico@gentoo.org>
Fri, 23 Sep 2011 01:54:52 +0000 (18:54 -0700)
pym/portage/dep/__init__.py

index 5bb6becdb7d2646b5cfe5673dc557c8f175b1e73..21e2fac1e36b2547b93391140fd5931301e4cb28 100644 (file)
@@ -1217,12 +1217,9 @@ class Atom(_atom_base):
                        allow_repo=True, allow_wildcard=True)
 
        def with_repo(self, repo):
-               if self.slot is None:
-                       atom = self
-               else:
-                       atom = remove_slot(self)
+               atom = remove_slot(self)
                if self.slot is not None:
-                       atom += _slot_separator + slot
+                       atom += _slot_separator + self.slot
                atom += _repo_separator + repo
                if self.use is not None:
                        atom += str(self.use)