1. Michał Górny
  2. smart-live-rebuild

Commits

Michał Górny  committed 77b2397

Move 'db' assignment fallback earlier.

  • Participants
  • Parent commits e621c79
  • Branches master

Comments (0)

Files changed (1)

File SmartLiveRebuild/core.py

View file
 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()