[py-svn] r34922 - py/dist/py/path/local

guido at codespeak.net guido at codespeak.net
Thu Nov 23 22:13:50 CET 2006


Author: guido
Date: Thu Nov 23 22:13:48 2006
New Revision: 34922

Modified:
   py/dist/py/path/local/local.py
Log:
Fixed bare excepts.


Modified: py/dist/py/path/local/local.py
==============================================================================
--- py/dist/py/path/local/local.py	(original)
+++ py/dist/py/path/local/local.py	Thu Nov 23 22:13:48 2006
@@ -630,21 +630,21 @@
         # make link...
         try:
             username = os.environ['USER']           #linux, et al
-        except:
+        except KeyError:
             try:
                 username = os.environ['USERNAME']   #windows
-            except:
+            except KeyError:
                 username = 'current'
 
         src  = str(udir)
         dest = src[:src.rfind('-')] + '-' + username
         try:
             os.unlink(dest)
-        except:
+        except OSError:
             pass
         try:
             os.symlink(src, dest)
-        except:
+        except OSError:
             pass
 
         return udir



More information about the pytest-commit mailing list