summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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()