diff options
Diffstat (limited to 'pym/portage/util.py')
-rw-r--r-- | pym/portage/util.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/pym/portage/util.py b/pym/portage/util.py index 4ccd512ae..6d9a23cd1 100644 --- a/pym/portage/util.py +++ b/pym/portage/util.py @@ -103,7 +103,7 @@ def grabfile(myfilename, compat_level=0, recursive=0): for x in mylines: #the split/join thing removes leading and trailing whitespace, and converts any whitespace in the line #into single spaces. - myline=" ".join(x.split()) + myline = u' '.join(x.split()) if not len(myline): continue if myline[0]=="#": @@ -317,7 +317,8 @@ def grablines(myfilename,recursive=0): os.path.join(myfilename, f), recursive)) else: try: - myfile = codecs.open(myfilename, mode='r', errors='replace') + myfile = codecs.open(myfilename, mode='r', + encoding=sys.getdefaultencoding(), errors='replace') mylines = myfile.readlines() myfile.close() except IOError, e: |