X-Git-Url: https://git.phdru.name/?a=blobdiff_plain;f=m_librarian%2Fdownload.py;h=30412013123eb317883464c7fef5d9c1cf0c790e;hb=ee485bf9817d65fb5b7641a6638b931cf7747b13;hp=8e309cb3cbda9a26b856d4f778fbcb25157740ab;hpb=8d0cd0faf04cf7a988b77d6fe2a4285444a2f3ea;p=m_librarian.git diff --git a/m_librarian/download.py b/m_librarian/download.py index 8e309cb..3041201 100755 --- a/m_librarian/download.py +++ b/m_librarian/download.py @@ -1,5 +1,6 @@ #! /usr/bin/env python +from __future__ import print_function import os from time import mktime from shutil import copyfileobj @@ -20,7 +21,7 @@ def _compile_format(): compile_format = False try: format = get_config().get('download', 'format') - except: + except Exception: return got_percent = False compiled = [] @@ -108,7 +109,8 @@ def download(book, path=None, a_format=None): def test(): _compile_format() - print compiled_format + print(compiled_format) + if __name__ == '__main__': test()