mirror of
https://github.com/l1ving/youtube-dl
synced 2025-02-05 03:54:13 +08:00
Option --lastrun ignores exitcode
This commit is contained in:
parent
f4cb904a5e
commit
d272e852a4
@ -672,6 +672,10 @@ def _real_main(argv=None):
|
||||
ydl.to_screen(u'--max-download limit reached, aborting.')
|
||||
retcode = 101
|
||||
|
||||
if opts.lastrun:
|
||||
with open(opts.lastrun, "w") as conf:
|
||||
conf.write(dateh.today().strftime("%Y%m%d"))
|
||||
|
||||
# Dump cookie jar if requested
|
||||
if opts.cookiefile is not None:
|
||||
try:
|
||||
@ -679,10 +683,6 @@ def _real_main(argv=None):
|
||||
except (IOError, OSError) as err:
|
||||
sys.exit(u'ERROR: unable to save cookie jar')
|
||||
|
||||
if opts.lastrun and retcode is 0:
|
||||
with open(opts.lastrun, "w") as conf:
|
||||
conf.write(dateh.today().strftime("%Y%m%d"))
|
||||
|
||||
sys.exit(retcode)
|
||||
|
||||
def main(argv=None):
|
||||
|
Loading…
Reference in New Issue
Block a user