mirror of
https://github.com/clinton-hall/nzbToMedia.git
synced 2025-08-20 13:23:18 -07:00
parent
bbc8f132c3
commit
6861b9915e
1 changed files with 7 additions and 6 deletions
|
@ -95,12 +95,13 @@ def process(section, dir_name, input_name=None, failed=False, client_agent='manu
|
||||||
# Attempt to create the directory if it doesn't exist and ignore any
|
# Attempt to create the directory if it doesn't exist and ignore any
|
||||||
# error stating that it already exists. This fixes a bug where SickRage
|
# error stating that it already exists. This fixes a bug where SickRage
|
||||||
# won't process the directory because it doesn't exist.
|
# won't process the directory because it doesn't exist.
|
||||||
try:
|
if dir_name:
|
||||||
os.makedirs(dir_name) # Attempt to create the directory
|
try:
|
||||||
except OSError as e:
|
os.makedirs(dir_name) # Attempt to create the directory
|
||||||
# Re-raise the error if it wasn't about the directory not existing
|
except OSError as e:
|
||||||
if e.errno != errno.EEXIST:
|
# Re-raise the error if it wasn't about the directory not existing
|
||||||
raise
|
if e.errno != errno.EEXIST:
|
||||||
|
raise
|
||||||
|
|
||||||
if 'process_method' not in fork_params or (client_agent in ['nzbget', 'sabnzbd'] and nzb_extraction_by != 'Destination'):
|
if 'process_method' not in fork_params or (client_agent in ['nzbget', 'sabnzbd'] and nzb_extraction_by != 'Destination'):
|
||||||
if input_name:
|
if input_name:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue