mirror of
https://github.com/ArchiveBox/ArchiveBox
synced 2024-11-10 06:34:16 +00:00
dont hide real exceptions
This commit is contained in:
parent
4db30779a3
commit
6bb91fbb45
2 changed files with 4 additions and 2 deletions
|
@ -57,7 +57,7 @@ def create_archive(export_file, service=None, resume=None):
|
|||
try:
|
||||
for link in links:
|
||||
dump_website(link, service)
|
||||
except (KeyboardInterrupt, SystemExit, Exception):
|
||||
except (KeyboardInterrupt, SystemExit, Exception) as e:
|
||||
print('{red}[X] Archive creation stopped.{reset}'.format(**ANSI))
|
||||
print(' Continue where you left off by running:')
|
||||
print(' ./archive.py {} {} {}'.format(
|
||||
|
@ -65,6 +65,8 @@ def create_archive(export_file, service=None, resume=None):
|
|||
service,
|
||||
link['timestamp'],
|
||||
))
|
||||
if not isinstance(e, KeyboardInterrupt):
|
||||
raise e
|
||||
raise SystemExit(1)
|
||||
|
||||
print('{}[√] [{}] Archive update complete.{}'.format(ANSI['green'], datetime.now().strftime('%Y-%m-%d %H:%M:%S'), ANSI['reset']))
|
||||
|
|
|
@ -168,7 +168,7 @@ def progress(seconds=TIMEOUT, prefix=''):
|
|||
def end():
|
||||
"""immediately finish progress and clear the progressbar line"""
|
||||
p.terminate()
|
||||
sys.stdout.write('\r{}\r'.format(' ' * TERM_WIDTH)) # clear whole terminal line
|
||||
sys.stdout.write('\r{}{}\r'.format((' ' * TERM_WIDTH), ANSI['reset'])) # clear whole terminal line
|
||||
sys.stdout.flush()
|
||||
|
||||
return end
|
||||
|
|
Loading…
Reference in a new issue