On 01/16/2012 02:44 PM, Zdenek Pavlas wrote: >> --- a/yum/yumRepo.py >> +++ b/yum/yumRepo.py >> if size: >> + size = int(size) >> dirstat = os.statvfs(os.path.dirname(local)) >> avail = dirstat.f_bavail * dirstat.f_bsize > > ACK, but.. > > I was looking at this some time ago. There are 10+ places > where Yum checks if size != None and then int/long(size).. > I think we should deal with it sooner, and the only place > I found where size is set to a string is: > > diff --git a/yum/repoMDObject.py b/yum/repoMDObject.py > index 31b1080..e7026f9 100755 > --- a/yum/repoMDObject.py > +++ b/yum/repoMDObject.py > @@ -66,7 +66,7 @@ class RepoData: > elif child_name == 'database_version': > self.dbversion = child.text > elif child_name == 'size': > - self.size = child.text > + self.size = int(child.text) > elif child_name == 'open-size': > self.opensize = child.text > > Is this the case? (Package parsed from xml metadata)? Yes, this was the case -- With kind regards, Sascha Peilicke SUSE Linux GmbH, Maxfeldstr. 5, D-90409 Nuernberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer HRB 16746 (AG Nürnberg)
signature.asc
Description: OpenPGP digital signature
_______________________________________________ Yum-devel mailing list [email protected] http://lists.baseurl.org/mailman/listinfo/yum-devel
