Commits

Michał Górny committed 9e26286

Reuse new Atom APIs when transforming atoms.

  • Participants
  • Parent commits c67f6dc

Comments (0)

Files changed (2)

gentoopm/paludispm/atom.py

 	@property
 	def slotted(self):
 		assert(self.associated)
-		cp = str(self._atom.package)
-		slot = self._pkg.metadata['SLOT']
+		cp = str(self.key)
+		slot = self.slot or self._pkg.metadata['SLOT']
 		return PaludisAtom('%s:%s' % (cp, slot), self._env)
 
 	@property
 	def unversioned(self):
 		assert(self.associated)
-		return PaludisAtom(str(self._atom.package), self._env)
+		return PaludisAtom(str(self.key), self._env)
 
 	@property
 	def key(self):

gentoopm/portagepm/atom.py

 	@property
 	def slotted(self):
 		assert(self.associated)
-		cp = self._atom.cp
+		cp = str(self.key)
 		slot = self._pkg.metadata['SLOT']
 		return PortageAtom('%s:%s' % (cp, slot))
 
 	@property
 	def unversioned(self):
 		assert(self.associated)
-		return PortageAtom(self._atom.cp)
+		return PortageAtom(str(self.key))
 
 	@property
 	def key(self):