Fix determining the dpkg architecture
authorRalf Jung <post@ralfj.de>
Wed, 18 Sep 2013 13:39:19 +0000 (15:39 +0200)
committerRalf Jung <post@ralfj.de>
Wed, 18 Sep 2013 13:39:19 +0000 (15:39 +0200)
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):