Browse Source

fixed to work with psycopg2

Natenom/support-murmur-13-1446181288462
Michael Ziegler 16 years ago
parent
commit
91fc0a75b3
  1. 8
      pyweb/mumble/management.py

8
pyweb/mumble/management.py

@ -41,11 +41,19 @@ def find_in_dicts( keys, conf, default, valueIfNotFound=None ):
for keyword in keys:
if keyword in conf:
if isinstance( conf[keyword], dbus.String ):
return unicode(conf[keyword]);
elif isinstance( conf[keyword], dbus.Int32 ):
return int(conf[keyword]);
return conf[keyword];
for keyword in keys:
keyword = keyword.lower();
if keyword in default:
if isinstance( default[keyword], dbus.String ):
return unicode(default[keyword]);
elif isinstance( default[keyword], dbus.Int32 ):
return int(default[keyword]);
return default[keyword];
return valueIfNotFound;

Loading…
Cancel
Save