Commits

Michał Górny committed f9faa0d

Py3: fix exception re-raising.

Comments (0)

Files changed (1)

lib/flaggie/action.py

 
 	def append(self, item):
 		if isinstance(item, Action.BaseAction):
-			reraising = False
+			exc = None
 			try:
 				item.clarify(self.pkgs, self._cache)
-			except ParserWarning:
-				reraising = True
+			except ParserWarning as e:
+				exc = e
 
 			for a in self:
 				if isinstance(item, a.__class__) and item.ns == a.ns:
 			else:
 				list.append(self, item)
 
-			if reraising:
-				raise
+			if exc is not None:
+				raise exc
 		else:
 			self.pkgs.append(item)