projects
/
portage.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a62ded6
)
Merged from trunk -r14552:14553
author
Fabian Groffen
<grobian@gentoo.org>
Sat, 10 Oct 2009 10:47:49 +0000
(10:47 -0000)
committer
Fabian Groffen
<grobian@gentoo.org>
Sat, 10 Oct 2009 10:47:49 +0000
(10:47 -0000)
| 14553 | Bug #288025 - Avoid AttributeError on OSes that don't have |
| zmedico | os.statvfs. |
svn path=/main/branches/prefix/; revision=14555
pym/portage/__init__.py
patch
|
blob
|
history
diff --git
a/pym/portage/__init__.py
b/pym/portage/__init__.py
index dc88bd823405ddece593943f214931496007c245..98965a28c5ee3cfdf008a7b4808a6dd148f4a40e 100644
(file)
--- a/
pym/portage/__init__.py
+++ b/
pym/portage/__init__.py
@@
-259,10
+259,12
@@
_os_overrides = {
id(_os.fdopen) : _os.fdopen,
id(_os.popen) : _os.popen,
id(_os.read) : _os.read,
- id(_os.statvfs) : _os.statvfs,
id(_os.system) : _os.system,
}
+if hasattr(_os, 'statvfs'):
+ _os_overrides[id(_os.statvfs)] = _os.statvfs
+
os = _unicode_module_wrapper(_os, overrides=_os_overrides,
encoding=_encodings['fs'])
_os_merge = _unicode_module_wrapper(_os,