Commits

Michał Górny committed 77b2397

Move 'db' assignment fallback earlier.

Comments (0)

Files changed (1)

SmartLiveRebuild/core.py

 def SmartLiveRebuild(opts, db = None, saveuid = False, settings = None):
 	if settings is None:
 		settings = portage.settings
+	if db is None:
+		db = portage.db[settings['ROOT']]['vartree'].dbapi
+
 	if not opts.color:
 		out.monochromize()
 
 			vcses = {}
 			bash = BashParser()
 			try:
-				if db is None:
-					db = portage.db[settings['ROOT']]['vartree'].dbapi
-
 				for cpv in db.cpv_all():
 					try:
 						inherits = db.aux_get(cpv, ['INHERITED'])[0].split()