mirror of
https://github.com/spl0k/supysonic.git
synced 2024-12-22 17:06:17 +00:00
fix SyntaxWarnings
This commit is contained in:
parent
37b1602461
commit
61edff6122
@ -59,7 +59,7 @@ class JSONBaseFormatter(BaseFormatter):
|
|||||||
if (elem is None) != (data is None):
|
if (elem is None) != (data is None):
|
||||||
raise ValueError("Expecting both elem and data or neither of them")
|
raise ValueError("Expecting both elem and data or neither of them")
|
||||||
|
|
||||||
rv = {"status": "failed" if elem is "error" else "ok", "version": API_VERSION}
|
rv = {"status": "failed" if elem == "error" else "ok", "version": API_VERSION}
|
||||||
if data:
|
if data:
|
||||||
rv[elem] = self.__remove_empty_lists(data)
|
rv[elem] = self.__remove_empty_lists(data)
|
||||||
|
|
||||||
@ -135,7 +135,7 @@ class XMLFormatter(BaseFormatter):
|
|||||||
raise ValueError("Expecting both elem and data or neither of them")
|
raise ValueError("Expecting both elem and data or neither of them")
|
||||||
|
|
||||||
response = {
|
response = {
|
||||||
"status": "failed" if elem is "error" else "ok",
|
"status": "failed" if elem == "error" else "ok",
|
||||||
"version": API_VERSION,
|
"version": API_VERSION,
|
||||||
"xmlns": "http://subsonic.org/restapi",
|
"xmlns": "http://subsonic.org/restapi",
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user