ERepublik: Set default values for party__*.

master
Valentin Lorentz 2013-05-22 23:56:13 +02:00
parent 437e553995
commit 4baad7f139
1 changed files with 5 additions and 1 deletions

View File

@ -64,7 +64,11 @@ def getCitizen(irc, name):
def flatten_subdicts(dicts):
"""Change dict of dicts into a dict of strings/integers. Useful for
using in string formatting."""
flat = {}
flat = {
'party__name': 'none',
'party__id': 0,
'party__role': 'N/A',
}
for key, value in dicts.items():
if isinstance(value, dict):
for subkey, subvalue in value.items():