Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 308839 Details for
Bug 411897
Fail correctly in perform_checksum
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Don't fail in the first place, and don't fail to not fail :)
dont_fail.patch (text/plain), 1.12 KB, created by
Greg Turner
on 2012-04-14 00:04:21 UTC
(
hide
)
Description:
Don't fail in the first place, and don't fail to not fail :)
Filename:
MIME Type:
Creator:
Greg Turner
Created:
2012-04-14 00:04:21 UTC
Size:
1.12 KB
patch
obsolete
>diff --git a/pym/portage/checksum.py b/pym/portage/checksum.py >index 73e01b5..7fadc60 100644 >--- a/pym/portage/checksum.py >+++ b/pym/portage/checksum.py >@@ -184,10 +184,8 @@ def _perform_md5_merge(x, **kwargs): > encoding=_encodings['merge'], errors='strict'), **kwargs) > > def perform_all(x, calc_prelink=0): >- mydict = {} >- for k in hashfunc_map: >- mydict[k] = perform_checksum(x, hashfunc_map[k], calc_prelink)[0] >- return mydict >+ return dict( (k, perform_checksum(x, k, calc_prelink)[0]) >+ for k in hashfunc_map.keys() ) > > def get_valid_checksum_keys(): > return list(hashfunc_map) >@@ -301,8 +299,9 @@ def perform_checksum(filename, hashname="MD5", calc_prelink=0): > prelink_capable = False > try: > if hashname not in hashfunc_map: >- raise portage.exception.DigestException(hashname + \ >- " hash function not available (needs dev-python/pycrypto)") >+ raise portage.exception.DigestException( >+ "%s hash function not available (needs dev-python/pycrypto)" >+ % hashname ) > myhash, mysize = hashfunc_map[hashname](myfilename) > except (OSError, IOError) as e: > if e.errno in (errno.ENOENT, errno.ESTALE):
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 411897
:
308835
| 308839