mirror of
https://github.com/clinton-hall/nzbToMedia.git
synced 2025-08-20 05:13:16 -07:00
Python 3: Convert 'except exceptClass, Target' to 'except exceptClass as Target'
This commit is contained in:
parent
03fa8bc973
commit
4a4087180b
2 changed files with 2 additions and 2 deletions
|
@ -24,7 +24,7 @@ class autoProcessMusic(object):
|
||||||
|
|
||||||
try:
|
try:
|
||||||
r = requests.get(url, params=params, verify=False, timeout=(30, 120))
|
r = requests.get(url, params=params, verify=False, timeout=(30, 120))
|
||||||
except Exception, e:
|
except Exception as e:
|
||||||
logger.error("Unable to open URL")
|
logger.error("Unable to open URL")
|
||||||
return None
|
return None
|
||||||
|
|
||||||
|
|
|
@ -131,7 +131,7 @@ class autoProcessTV(object):
|
||||||
# won't process the directory because it doesn't exist.
|
# won't process the directory because it doesn't exist.
|
||||||
try:
|
try:
|
||||||
os.makedirs(dirName) # Attempt to create the directory
|
os.makedirs(dirName) # Attempt to create the directory
|
||||||
except OSError, e:
|
except OSError as e:
|
||||||
# Re-raise the error if it wasn't about the directory not existing
|
# Re-raise the error if it wasn't about the directory not existing
|
||||||
if e.errno != errno.EEXIST:
|
if e.errno != errno.EEXIST:
|
||||||
raise
|
raise
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue