mirror of
https://github.com/gryf/ebook-converter.git
synced 2026-01-20 03:24:12 +01:00
Fix flake8 issues in ui module.
This commit is contained in:
@@ -96,13 +96,16 @@ def _run_filetype_plugins(path_to_file, ft=None, occasion='preprocess'):
|
||||
pass
|
||||
try:
|
||||
nfp = plugin.run(nfp) or nfp
|
||||
except:
|
||||
except Exception:
|
||||
print('Running file type plugin %s failed with traceback:' %
|
||||
plugin.name, file=oe)
|
||||
traceback.print_exc(file=oe)
|
||||
sys.stdout, sys.stderr = oo, oe
|
||||
x = lambda j: os.path.normpath(os.path.normcase(j))
|
||||
if occasion == 'postprocess' and x(nfp) != x(path_to_file):
|
||||
|
||||
def norm(string):
|
||||
return os.path.normpath(os.path.normcase(string))
|
||||
|
||||
if occasion == 'postprocess' and norm(nfp) != norm(path_to_file):
|
||||
shutil.copyfile(nfp, path_to_file)
|
||||
nfp = path_to_file
|
||||
return nfp
|
||||
|
||||
Reference in New Issue
Block a user