mirror of
https://github.com/kovidgoyal/calibre.git
synced 2026-02-23 11:40:06 -05:00
Pylint warning (manual)
This commit is contained in:
parent
de8921a6ac
commit
2d80b11a20
@ -77,7 +77,7 @@ def do_list(fields, data, opts):
|
||||
widths = [0 for x in fields]
|
||||
for i in data:
|
||||
for j, field in enumerate(fields):
|
||||
widths[j] = max(widths[j], max(len(field), len(str(i[field]))))
|
||||
widths[j] = max(widths[j], len(field), len(str(i[field])))
|
||||
|
||||
screen_width = geometry()[0]
|
||||
if not screen_width:
|
||||
|
||||
@ -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))
|
||||
opts.auto_reload_port = int(os.environ.get('CALIBRE_AUTORELOAD_PORT', 0)) # noqa: PLW1508
|
||||
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')
|
||||
|
||||
@ -300,7 +300,7 @@ class TestAuth(BaseTest):
|
||||
# Test that a replay attack against a different URL does not work
|
||||
try:
|
||||
build_opener(cookie_handler).open(url+'2')
|
||||
assert ('Replay attack succeeded')
|
||||
assert True, 'Replay attack succeeded'
|
||||
except HTTPError as e:
|
||||
self.ae(e.code, http_client.UNAUTHORIZED)
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user