writemsg("!!! File Not Found: '%s'\n" % file_path, noiselevel=-1)
continue
- # TODO: Make getconfig() return unicode.
- unicode_config = {}
- for k, v in myconfig.iteritems():
- if not isinstance(k, unicode):
- k = unicode(k, encoding='utf8', errors='replace')
- if not isinstance(v, unicode):
- v = unicode(v, encoding='utf8', errors='replace')
- unicode_config[k] = v
- myconfig = unicode_config
- del unicode_config
-
config_list.append(myconfig)
if "SPACE_SEPARATED" in myconfig:
space_separated.update(myconfig["SPACE_SEPARATED"].split())
raise portage.exception.CorruptionError("ParseError: Unexpected EOF: "+str(mycfg)+": line "+str(lex.lineno))
else:
return mykeys
+ if not isinstance(key, unicode):
+ key = unicode(key, encoding='utf_8', errors='replace')
+ if not isinstance(val, unicode):
+ val = unicode(val, encoding='utf_8', errors='replace')
if expand:
mykeys[key] = varexpand(val, expand_map)
expand_map[key] = mykeys[key]