From e93179577e958e5765f880108fd0b2f50b237394 Mon Sep 17 00:00:00 2001 From: "jkeating@dhcp83-49.boston.redhat.com" <> Date: Mon, 11 Dec 2006 17:13:02 -0500 Subject: [PATCH] Fix some srpm stuff, split rather than strip, rsplit rather than rstrip. --- pypungi/gather.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pypungi/gather.py b/pypungi/gather.py index 83dfdc12..4e4c59a9 100755 --- a/pypungi/gather.py +++ b/pypungi/gather.py @@ -106,7 +106,7 @@ class Gather(yum.YumBase): for po in self.polist: - srpm = po.returnSimple('sourcerpm').strip('.src.rpm') + srpm = po.returnSimple('sourcerpm').split('.src.rpm')[0] if not srpm in self.srpmlist: self.srpmlist.append(srpm) @@ -178,7 +178,7 @@ class Gather(yum.YumBase): self.doSackSetup(archlist=['src']) for srpm in self.srpmlist: - (sname, sver, srel) = srpm.rstrip('-', 2) + (sname, sver, srel) = srpm.rsplit('-', 2) try: srpmpo = self.pkgSack.searchNevra(name=sname, ver=sver, rel=srel)[0] if not srpmpo in srpmpolist: