public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] portage r10005 - main/trunk/pym/_emerge
@ 2008-04-27 20:52 Zac Medico (zmedico)
  0 siblings, 0 replies; only message in thread
From: Zac Medico (zmedico) @ 2008-04-27 20:52 UTC (permalink / raw
  To: gentoo-commits

Author: zmedico
Date: 2008-04-27 20:52:22 +0000 (Sun, 27 Apr 2008)
New Revision: 10005

Modified:
   main/trunk/pym/_emerge/__init__.py
Log:
* Remove the only remaining sys.exit() calls inside the depgraph class.
* Fix _unknown_internal_error() to work with zero arguments.


Modified: main/trunk/pym/_emerge/__init__.py
===================================================================
--- main/trunk/pym/_emerge/__init__.py	2008-04-27 20:16:52 UTC (rev 10004)
+++ main/trunk/pym/_emerge/__init__.py	2008-04-27 20:52:22 UTC (rev 10005)
@@ -2549,14 +2549,14 @@
 					portage.writemsg("!!! to aid in the detection of malicious intent.\n\n")
 					portage.writemsg("!!! THIS IS A POSSIBLE INDICATION OF TAMPERED FILES -- CHECK CAREFULLY.\n")
 					portage.writemsg("!!! Affected file: %s\n" % (e), noiselevel=-1)
-					sys.exit(1)
+					return 0, myfavorites
 				except portage.exception.InvalidSignature, e:
 					portage.writemsg("\n\n!!! An invalid gpg signature is preventing portage from calculating the\n")
 					portage.writemsg("!!! required dependencies. This is a security feature enabled by the admin\n")
 					portage.writemsg("!!! to aid in the detection of malicious intent.\n\n")
 					portage.writemsg("!!! THIS IS A POSSIBLE INDICATION OF TAMPERED FILES -- CHECK CAREFULLY.\n")
 					portage.writemsg("!!! Affected file: %s\n" % (e), noiselevel=-1)
-					sys.exit(1)
+					return 0, myfavorites
 				except SystemExit, e:
 					raise # Needed else can't exit
 				except Exception, e:
@@ -3678,7 +3678,7 @@
 				print
 				print "!!! Note that circular dependencies can often be avoided by temporarily"
 				print "!!! disabling USE flags that trigger optional dependencies."
-				sys.exit(1)
+				raise self._unknown_internal_error()
 
 			# At this point, we've succeeded in selecting one or more nodes, so
 			# it's now safe to reset the prefer_asap and accept_root_node flags
@@ -4678,7 +4678,11 @@
 			fakedb[myroot].cpv_inject(pkg)
 			self.spinner.update()
 
-	class _unknown_internal_error(portage.exception.PortageException):
+	class _internal_exception(portage.exception.PortageException):
+		def __init__(self, value=""):
+			portage.exception.PortageException.__init__(self, value)
+
+	class _unknown_internal_error(_internal_exception):
 		"""
 		Used by the depgraph internally to terminate graph creation.
 		The specific reason for the failure should have been dumped
@@ -4686,7 +4690,7 @@
 		may not be known.
 		"""
 
-	class _serialize_tasks_retry(portage.exception.PortageException):
+	class _serialize_tasks_retry(_internal_exception):
 		"""
 		This is raised by the _serialize_tasks() method when it needs to
 		be called again for some reason. The only case that it's currently

-- 
gentoo-commits@lists.gentoo.org mailing list



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2008-04-27 20:52 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-04-27 20:52 [gentoo-commits] portage r10005 - main/trunk/pym/_emerge Zac Medico (zmedico)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox