Cleanup previous PR

This commit is contained in:
Kovid Goyal 2025-10-11 08:57:07 +05:30
parent 1798fb5439
commit 508a0b1586
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C
2 changed files with 3 additions and 1 deletions

View File

@ -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

View File

@ -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')