mirror of
https://github.com/kovidgoyal/calibre.git
synced 2026-04-28 11:40:44 -04:00
Cleanup previous PR
This commit is contained in:
parent
1798fb5439
commit
508a0b1586
@ -299,6 +299,8 @@ class Convert:
|
||||
if name is None:
|
||||
cname = self.docx.document_name.split('/')
|
||||
cname[-1] = defname
|
||||
if self.docx.exists('/'.join(cname)):
|
||||
name = cname
|
||||
if name and name.startswith('word/word') and not self.docx.exists(name):
|
||||
name = name.partition('/')[2]
|
||||
return name
|
||||
|
||||
@ -220,7 +220,7 @@ def main(args=sys.argv):
|
||||
raise SystemExit(_('No database found at CALIBRE_OVERRIDE_DATABASE_PATH: {}').format(
|
||||
os.environ['CALIBRE_OVERRIDE_DATABASE_PATH']))
|
||||
|
||||
opts.auto_reload_port = int(os.environ.get('CALIBRE_AUTORELOAD_PORT', 0)) # noqa: PLW1508
|
||||
opts.auto_reload_port = int(os.environ.get('CALIBRE_AUTORELOAD_PORT', '0'))
|
||||
opts.allow_console_print = 'CALIBRE_ALLOW_CONSOLE_PRINT' in os.environ
|
||||
if opts.log and os.path.isdir(opts.log):
|
||||
raise SystemExit('The --log option must point to a file, not a directory')
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user