mirror of https://github.com/evilhero/mylar
Fixed sandwich variable not being assigned
Added try-except for post-processing failed comics when sandwich was not defined by current parameters. UnboundLocalError: local variable 'sandwich' referenced before assignment
This commit is contained in:
parent
22bf11ef13
commit
4ae28f6dbf
|
@ -170,15 +170,21 @@ class FailedProcessor(object):
|
||||||
sandwich = issueid
|
sandwich = issueid
|
||||||
elif 'G' in issueid or '-' in issueid:
|
elif 'G' in issueid or '-' in issueid:
|
||||||
sandwich = 1
|
sandwich = 1
|
||||||
if helpers.is_number(sandwich):
|
try:
|
||||||
if sandwich < 900000:
|
if helpers.is_number(sandwich):
|
||||||
|
if sandwich < 900000:
|
||||||
# if sandwich is less than 900000 it's a normal watchlist download. Bypass.
|
# if sandwich is less than 900000 it's a normal watchlist download. Bypass.
|
||||||
pass
|
pass
|
||||||
else:
|
else:
|
||||||
logger.info('Failed download handling for story-arcs and one-off\'s are not supported yet. Be patient!')
|
logger.info('Failed download handling for story-arcs and one-off\'s are not supported yet. Be patient!')
|
||||||
self._log(' Unable to locate downloaded file to rename. PostProcessing aborted.')
|
self._log(' Unable to locate downloaded file to rename. PostProcessing aborted.')
|
||||||
|
self.valreturn.append({"self.log": self.log,
|
||||||
|
"mode": 'stop'})
|
||||||
|
return self.queue.put(self.valreturn)
|
||||||
|
except NameError:
|
||||||
|
logger.info('sandwich was not defined. Post-processing aborted...')
|
||||||
self.valreturn.append({"self.log": self.log,
|
self.valreturn.append({"self.log": self.log,
|
||||||
"mode": 'stop'})
|
"mode": 'stop'})
|
||||||
|
|
||||||
return self.queue.put(self.valreturn)
|
return self.queue.put(self.valreturn)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue