success, atoms = portage.dep_check(depstr,
final_db, pkgsettings, myuse=self._pkg_use_enabled(pkg),
trees=self._dynamic_config._graph_trees, myroot=myroot)
+ except SystemExit:
+ raise
except Exception as e:
- if isinstance(e, SystemExit):
- raise
# This is helpful, for example, if a ValueError
# is thrown from cpv_expand due to multiple
# matches (this can happen if an atom lacks a
raise cache_errors.CacheCorruption(self, cpv, e)
if self.con.rowcount <= 0:
raise KeyError(cpv)
+ except SystemExit:
+ raise
except Exception:
if not self.autocommits:
self.db.rollback()
if self.autocommits:
self.commit()
+ except SystemExit:
+ raise
except Exception:
if not self.autocommits:
try:
try:
os.makedirs(os.path.dirname(archive))
- except:
+ except OSError:
pass
try:
try:
os.makedirs(os.path.dirname(archive))
- except:
+ except OSError:
pass
# Archive the current config file if it isn't already saved
try:
from urllib.parse import unquote as urllib_parse_unquote
-except:
+except ImportError:
from urllib2 import unquote as urllib_parse_unquote
try:
writemsg(_("lockfile does not exist '%s'\n") % lockfilename, 1)
os.close(myfd)
return False
+ except SystemExit:
+ raise
except Exception as e:
writemsg(_("Failed to get lock... someone took it.\n"), 1)
writemsg(str(e)+"\n",1)
try:
_exec(binary, mycommand, opt_name, fd_pipes,
env, gid, groups, uid, umask, pre_exec)
+ except SystemExit:
+ raise
except Exception as e:
# We need to catch _any_ exception so that it doesn't
# propogate out of this function and cause exiting
try:
try:
self.setUp()
+ except SystemExit:
+ raise
except KeyboardInterrupt:
raise
except:
result.addError(self, sys.exc_info())
try:
self.tearDown()
+ except SystemExit:
+ raise
except KeyboardInterrupt:
raise
except: