projects
/
auto-debuild.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
4919576
)
Use subprocess.check_output
author
Ralf Jung
<post@ralfj.de>
Fri, 20 Sep 2013 13:42:07 +0000
(15:42 +0200)
committer
Ralf Jung
<post@ralfj.de>
Fri, 20 Sep 2013 13:42:07 +0000
(15:42 +0200)
auto_debuild.py
patch
|
blob
|
history
diff --git
a/auto_debuild.py
b/auto_debuild.py
index a5fb5bce00d7c61209d023a4662c47bf2228a56b..11935ef4b1fe27254e77f961e303d8906f13cc38 100755
(executable)
--- a/
auto_debuild.py
+++ b/
auto_debuild.py
@@
-177,10
+177,8
@@
def commandInBuildEnv(config, command):
def getArchitecture(config):
cmd = commandInBuildEnv(config, ['dpkg-architecture', '-qDEB_HOST_ARCH'])
def getArchitecture(config):
cmd = commandInBuildEnv(config, ['dpkg-architecture', '-qDEB_HOST_ARCH'])
- 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.decode('utf-8').strip('\n') # chop of the \n at the end
+ output = subprocess.check_output(cmd)
+ return output.decode('utf-8').strip('\n') # chop of the \n at the end
def writeDependency(f, name, list):
if len(list):
def writeDependency(f, name, list):
if len(list):