[Lint] Fix issues picked up by scrutinizer

This commit is contained in:
Calum Lind 2016-04-10 10:58:57 +01:00
parent d58960d723
commit 73220b5116
2 changed files with 2 additions and 2 deletions

View File

@ -260,7 +260,7 @@ class JSONRequestFailedTestCase(JSONBase):
self.assertEquals(response["id"], 0) self.assertEquals(response["id"], 0)
self.assertEquals(response["error"]["message"], self.assertEquals(response["error"]["message"],
"Failure: [Failure instance: Traceback (failure with no frames):" "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) self.assertEquals(response["error"]["code"], 4)
request.write = write request.write = write

View File

@ -875,7 +875,7 @@ class WebApi(JSONComponent):
web_config = component.get("DelugeWeb").config web_config = component.get("DelugeWeb").config
for key in config.keys(): for key in config.keys():
if key in ["sessions", "pwd_salt", "pwd_sha1"]: 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 continue
if isinstance(config[key], basestring): if isinstance(config[key], basestring):
config[key] = config[key].encode("utf8") config[key] = config[key].encode("utf8")