[Lint] Fix issues picked up by scrutinizer
This commit is contained in:
parent
d58960d723
commit
73220b5116
|
@ -260,7 +260,7 @@ class JSONRequestFailedTestCase(JSONBase):
|
|||
self.assertEquals(response["id"], 0)
|
||||
self.assertEquals(response["error"]["message"],
|
||||
"Failure: [Failure instance: Traceback (failure with no frames):"
|
||||
" <class 'deluge.error.DelugeError'>: DelugeERROR\n]"),
|
||||
" <class 'deluge.error.DelugeError'>: DelugeERROR\n]")
|
||||
self.assertEquals(response["error"]["code"], 4)
|
||||
|
||||
request.write = write
|
||||
|
|
|
@ -875,7 +875,7 @@ class WebApi(JSONComponent):
|
|||
web_config = component.get("DelugeWeb").config
|
||||
for key in config.keys():
|
||||
if key in ["sessions", "pwd_salt", "pwd_sha1"]:
|
||||
log.warn("Ignored attempt to overwrite web config key '%s'" % key)
|
||||
log.warn("Ignored attempt to overwrite web config key '%s'", key)
|
||||
continue
|
||||
if isinstance(config[key], basestring):
|
||||
config[key] = config[key].encode("utf8")
|
||||
|
|
Loading…
Reference in New Issue