diff options
-rw-r--r-- | pym/portage.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/pym/portage.py b/pym/portage.py index 703c905c6..c36b9ef6e 100644 --- a/pym/portage.py +++ b/pym/portage.py @@ -6484,10 +6484,11 @@ class dblink: # handy variables; mydest is the target object on the live filesystems; # mysrc is the source object in the temporary install dir try: - mydmode=os.lstat(mydest)[stat.ST_MODE] - except SystemExit, e: - raise - except: + mydmode = os.lstat(mydest).st_mode + except OSError, e: + if e.errno != errno.ENOENT: + raise + del e #dest file doesn't exist mydmode=None |