Commit 0269eaa5 authored by Jason R. Coombs's avatar Jason R. Coombs Committed by GitHub

Merge pull request #670 from stepshal/exception

Use 'except Exception:' instead of 'except:'.
parents 0cd550a8 b3b8a8d1
...@@ -431,7 +431,7 @@ class easy_install(Command): ...@@ -431,7 +431,7 @@ class easy_install(Command):
""" """
try: try:
pid = os.getpid() pid = os.getpid()
except: except Exception:
pid = random.randint(0, sys.maxsize) pid = random.randint(0, sys.maxsize)
return os.path.join(self.install_dir, "test-easy-install-%s" % pid) return os.path.join(self.install_dir, "test-easy-install-%s" % pid)
...@@ -929,7 +929,7 @@ class easy_install(Command): ...@@ -929,7 +929,7 @@ class easy_install(Command):
destination, destination,
fix_zipimporter_caches=new_dist_is_zipped, fix_zipimporter_caches=new_dist_is_zipped,
) )
except: except Exception:
update_dist_caches(destination, fix_zipimporter_caches=False) update_dist_caches(destination, fix_zipimporter_caches=False)
raise raise
......
...@@ -99,7 +99,7 @@ class sdist(orig.sdist): ...@@ -99,7 +99,7 @@ class sdist(orig.sdist):
# file. # file.
try: try:
orig.sdist.read_template(self) orig.sdist.read_template(self)
except: except Exception:
_, _, tb = sys.exc_info() _, _, tb = sys.exc_info()
tb.tb_next.tb_frame.f_locals['template'].close() tb.tb_next.tb_frame.f_locals['template'].close()
raise raise
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment