##// END OF EJS Templates
config: reject str sections and keys on Python 3...
Gregory Szorc -
r41347:4ad002b2 default
parent child Browse files
Show More
@@ -78,6 +78,10 b' class config(object):'
78 return list(self._data.get(section, {}).iteritems())
78 return list(self._data.get(section, {}).iteritems())
79 def set(self, section, item, value, source=""):
79 def set(self, section, item, value, source=""):
80 if pycompat.ispy3:
80 if pycompat.ispy3:
81 assert not isinstance(section, str), (
82 'config section may not be unicode strings on Python 3')
83 assert not isinstance(item, str), (
84 'config item may not be unicode strings on Python 3')
81 assert not isinstance(value, str), (
85 assert not isinstance(value, str), (
82 'config values may not be unicode strings on Python 3')
86 'config values may not be unicode strings on Python 3')
83 if section not in self:
87 if section not in self:
General Comments 0
You need to be logged in to leave comments. Login now