Fix determining the dpkg architecture
[auto-debuild.git] / auto_debuild.py
index 410d8489cd3118b5d5fd2e4cd0f79db5c06e43a9..a5fb5bce00d7c61209d023a4662c47bf2228a56b 100755 (executable)
@@ -180,7 +180,7 @@ def getArchitecture(config):
        with subprocess.Popen(cmd, stdout=subprocess.PIPE) as p:
                res = p.communicate()[0] # get only stdout
                if p.returncode != 0: raise Exception("Querying dpkg for the architecture failed")
-       return res[0:len(res)-1] # chop of the \n at the end
+       return res.decode('utf-8').strip('\n') # chop of the \n at the end
 
 def writeDependency(f, name, list):
        if len(list):