[hg] galaxy 1719: Fix an infinite loop in eggs.require()
details: http://www.bx.psu.edu/hg/galaxy/rev/4fa4d0ddbf1f changeset: 1719:4fa4d0ddbf1f user: Nate Coraor <nate@bx.psu.edu> date: Fri Jan 23 12:55:35 2009 -0500 description: Fix an infinite loop in eggs.require() 1 file(s) affected in this change: lib/galaxy/eggs/__init__.py diffs (31 lines): diff -r 520c6e39b3d0 -r 4fa4d0ddbf1f lib/galaxy/eggs/__init__.py --- a/lib/galaxy/eggs/__init__.py Thu Jan 22 12:46:37 2009 -0500 +++ b/lib/galaxy/eggs/__init__.py Fri Jan 23 12:55:35 2009 -0500 @@ -530,7 +530,7 @@ return except pkg_resources.VersionConflict, e: # there's a conflicting egg on the pythonpath, remove it - dist = pkg_resources.get_distribution( name ) + dist = e.args[0] working_set = pkg_resources.working_set # use the canonical path for comparisons location = os.path.realpath( dist.location ) @@ -543,18 +543,6 @@ del working_set.by_key[dist.key] working_set.entry_keys[entry] = [] sys.path.remove(entry) - # get - egg.find() - if not egg.have: - if not egg.fetch(): - raise EggNotFetchable( egg.name ) - pkg_resources.working_set.require( "%s==%s" % ( name, egg.get_vertag() ) ) - if dist.project_name in sys.modules: - try: - mod = sys.modules[dist.project_name] - reload( mod ) - except: - raise NewEgg( "Galaxy downloaded a new egg (%s) but was unable to reload the module it contained. Please try starting Galaxy again." % egg.name ) except pkg_resources.DistributionNotFound, e: # the initial require itself is the first dep, but it can have # multiple deps, which will be fetched by the require below.
participants (1)
-
Nate Coraor