summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2007-08-21 07:36:11 +0000
committerZac Medico <zmedico@gentoo.org>2007-08-21 07:36:11 +0000
commitf7e9270a9ec482ddd2fd3bf5e75b4cf7aa826cb5 (patch)
treee70c464a3a87d38b665c15f47a7a6b08546237fa
parentc382c0fc05f130ba222110264887fb0d8d761245 (diff)
downloadportage-f7e9270a9ec482ddd2fd3bf5e75b4cf7aa826cb5.tar.gz
portage-f7e9270a9ec482ddd2fd3bf5e75b4cf7aa826cb5.tar.bz2
portage-f7e9270a9ec482ddd2fd3bf5e75b4cf7aa826cb5.zip
Just use os.listdir() since portage.listdir() is unnecessary.
svn path=/main/trunk/; revision=7651
-rw-r--r--pym/portage/elog/messages.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/pym/portage/elog/messages.py b/pym/portage/elog/messages.py
index c2b21ac80..e90080062 100644
--- a/pym/portage/elog/messages.py
+++ b/pym/portage/elog/messages.py
@@ -7,17 +7,19 @@ from portage.output import colorize
from portage.const import EBUILD_PHASES
from portage.util import writemsg
-from portage import listdir
-
import os
def collect_ebuild_messages(path):
""" Collect elog messages generated by the bash logging function stored
at 'path'.
"""
- mylogfiles = listdir(path)
+ mylogfiles = None
+ try:
+ mylogfiles = os.listdir(path)
+ except OSError:
+ pass
# shortcut for packages without any messages
- if len(mylogfiles) == 0:
+ if not mylogfiles:
return {}
# exploit listdir() file order so we process log entries in chronological order
mylogfiles.reverse()