svn path=/main/trunk/; revision=7651
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()