File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -89,9 +89,9 @@ def do_mkdir(dirname):
89
89
90
90
try :
91
91
os .mkdir (dirname )
92
- except OSError , ( errno ) :
93
- if errno == 17 :
94
- pass # directory already exists
92
+ except OSError as e :
93
+ if e . errno == 17 :
94
+ pass # directory already exists
95
95
96
96
###############################################################################
97
97
@@ -518,13 +518,13 @@ def getFileOrURL(filename, url):
518
518
print ("Found" , filename , "cached on disk, using local copy" )
519
519
retval = f .read ()
520
520
return retval
521
- except IOError , e :
521
+ except IOError :
522
522
pass
523
523
print ("Downloading" , filename , "from" , url )
524
524
req = Request (url )
525
525
try :
526
526
response = urlopen (req )
527
- except URLError , e :
527
+ except URLError as e :
528
528
if hasattr (e , 'reason' ):
529
529
print ("Failed to reach download server. Reason:" , e .reason )
530
530
elif hasattr (e , 'code' ):
You can’t perform that action at this time.
0 commit comments