fix some dict.keys()

This commit is contained in:
Yann Leboulanger 2013-01-02 18:23:38 +01:00
parent 3fdefe20b7
commit ed21564970
1 changed files with 2 additions and 2 deletions

View File

@ -635,7 +635,7 @@ class Config:
def get(self, optname=None): def get(self, optname=None):
if not optname: if not optname:
return self.__options[1].keys() return list(self.__options[1].keys())
if optname not in self.__options[1]: if optname not in self.__options[1]:
return None return None
return self.__options[1][optname] return self.__options[1][optname]
@ -710,7 +710,7 @@ class Config:
return None return None
dict_ = self.__options_per_key[optname][1] dict_ = self.__options_per_key[optname][1]
if not key: if not key:
return dict_.keys() return list(dict_.keys())
if key not in dict_: if key not in dict_:
if subname in self.__options_per_key[optname][0]: if subname in self.__options_per_key[optname][0]:
return self.__options_per_key[optname][0][subname][1] return self.__options_per_key[optname][0][subname][1]