Commits

Michał Górny  committed 1297dbd

Make enumeration exceptions non-fatal.

  • Participants
  • Parent commits 4990509

Comments (0)

Files changed (1)

File smart-live-rebuild.py

 	def s3(self, msg):
 		self.out('--> %s\n' % msg)
 
+	@classmethod
+	def err(self, msg):
+		self.out('!!! %s\n' % msg)
+
 	@staticmethod
 	def out(msg):
 		sys.stderr.write(msg)
 		f = bz2.BZ2File(fn, 'r')
 		return utfdec(f.read())[0].split('\n')
 
-	inherits = db.aux_get(cpv, ['INHERITED'])[0].split()
-
-	for vcs in vcsl:
-		if vcs.match(inherits):
-			env = getenv()
-			vcs = vcs(cpv, env)
-			dir = vcs.getpath()
-			if dir not in rebuilds:
-				rebuilds[dir] = vcs
-			else:
-				rebuilds[dir].append(vcs)
+	try:
+		inherits = db.aux_get(cpv, ['INHERITED'])[0].split()
+
+		for vcs in vcsl:
+			if vcs.match(inherits):
+				env = getenv()
+				vcs = vcs(cpv, env)
+				dir = vcs.getpath()
+				if dir not in rebuilds:
+					rebuilds[dir] = vcs
+				else:
+					rebuilds[dir].append(vcs)
+	except Exception as e:
+		out.err('Error enumerating %s: [%s] %s' % (cpv, e.__class__.__name__, e))
 
 out.s1('Updating repositories ...')
 packages = []