浏览代码

grass.py: decode username if of type bytes (contributed by Carmen Tawalika, https://github.com/GRASS-GIS/grass-ci/pull/3)

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@74051 15284696-431f-4ddb-bdfa-cd5b030d7da7
Markus Neteler 6 年之前
父节点
当前提交
6c92676488
共有 1 个文件被更改,包括 2 次插入0 次删除
  1. 2 0
      lib/init/grass.py

+ 2 - 0
lib/init/grass.py

@@ -1933,6 +1933,8 @@ def get_username():
                 s = p.stdout.read()
                 p.wait()
                 user = s.strip()
+                if type(user) is bytes:
+                    user = decode(user)
             except:
                 pass
         if not user: