Simplified and reduced redundancy in code

- Removed 'if type == "info"' as requested by @kevr

- Checked for valid type against the type dictionary, removing the 
needed to maintain two separate spots for type definitions.
This commit is contained in:
Hunter Wittenborn 2021-09-16 03:34:52 -05:00
parent a4f5c8bef6
commit 25aea216c5
2 changed files with 16 additions and 10 deletions

View file

@ -58,10 +58,6 @@ async def rpc(request: Request,
elif v != 5:
return {"error": "Invalid version specified."}
# The PHP implementation sets the type to 'multiinfo' when the type is set to 'info'.
if type == "info":
type = "multiinfo"
# Defaults for returned data
returned_data = {}