Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 100670 Details for
Bug 153181
Corrupt binary packge triggers AttributeError: 'NoneType' object has no attribute 'strip'
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
fix AttributeError for invalid binpkgs that have no CATEGORY data
invalid_binpkg.patch (text/plain), 1.29 KB, created by
Zac Medico
on 2006-10-28 16:07:48 UTC
(
hide
)
Description:
fix AttributeError for invalid binpkgs that have no CATEGORY data
Filename:
MIME Type:
Creator:
Zac Medico
Created:
2006-10-28 16:07:48 UTC
Size:
1.29 KB
patch
obsolete
>Index: pym/portage.py >=================================================================== >--- pym/portage.py (revision 4867) >+++ pym/portage.py (revision 4870) >@@ -5612,8 +5612,10 @@ > mypath = os.path.join("All", myfile) > dest_path = os.path.join(self.pkgdir, mypath) > if os.path.exists(dest_path): >- other_cat = xpak.tbz2(dest_path).getfile("CATEGORY").strip() >+ # For invalid packages, other_cat could be None. >+ other_cat = xpak.tbz2(dest_path).getfile("CATEGORY") > if other_cat: >+ other_cat = other_cat.strip() > self._move_from_all(other_cat + "/" + mypkg) > """The file may or may not exist. Move it if necessary and update > internal state for future calls to getname().""" >@@ -5680,7 +5682,8 @@ > if os.path.islink(full_path): > continue > mytbz2 = xpak.tbz2(full_path) >- mycat = mytbz2.getfile("CATEGORY").strip() >+ # For invalid packages, mycat could be None. >+ mycat = mytbz2.getfile("CATEGORY") > mypkg = myfile[:-5] > if not mycat: > #old-style or corrupt package >@@ -5690,6 +5693,8 @@ > "recoverable and should be deleted.\n", > noiselevel=-1) > self.invalids.append(mypkg) >+ continue >+ mycat = mycat.strip() > if mycat != mydir and mydir != "All": > continue > if mypkg != mytbz2.getfile("PF").strip():
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 153181
:
100666
| 100670