Browse Source

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 years ago
parent
commit
6c92676488
1 changed files with 2 additions and 0 deletions
  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: