Do not repeat stderr and stdout when -v/--verbose

This commit is contained in:
Daniel Martí 2013-10-02 19:28:43 +02:00
parent 8f8360fcf6
commit 890a1adb6f
2 changed files with 27 additions and 17 deletions

View file

@ -1015,9 +1015,9 @@ class BuildException(Exception):
def __str__(self):
ret = repr(self.value)
if self.stdout:
ret = ret + "\n==== stdout begin ====\n" + str(self.stdout) + "\n==== stdout end ===="
ret += "\n==== stdout begin ====\n%s\n==== stdout end ====" % self.stdout.strip()
if self.stderr:
ret = ret + "\n==== stderr begin ====\n" + str(self.stderr) + "\n==== stderr end ===="
ret += "\n==== stderr begin ====\n%s\n==== stderr end ====" % self.stderr.strip()
return ret
class VCSException(Exception):
@ -1657,8 +1657,8 @@ def isApkDebuggable(apkfile):
execfile('config.py', globals())
p = subprocess.Popen([os.path.join(sdk_path, 'build-tools', build_tools, 'aapt'),
'dump', 'xmltree', apkfile, 'AndroidManifest.xml'],
stdout=subprocess.PIPE)
'dump', 'xmltree', apkfile, 'AndroidManifest.xml'],
stdout=subprocess.PIPE)
output = p.communicate()[0]
if p.returncode != 0:
print "ERROR: Failed to get apk manifest information"