summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2015-01-29 14:32:15 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-02-11 17:39:53 +0000
commit88b9a9dd491d6803a72c497cf674434da14704b7 (patch)
tree571156f29f3b4581fd6444b50c70bdce7cf3ee4d
parentfdf9e8e4679bb04e89222034ba999ae3bee63938 (diff)
downloadopenembedded-core-88b9a9dd491d6803a72c497cf674434da14704b7.tar.gz
openembedded-core-88b9a9dd491d6803a72c497cf674434da14704b7.tar.bz2
openembedded-core-88b9a9dd491d6803a72c497cf674434da14704b7.zip
scripts/send-error-report: Set exit code if error occurs
If an error occurs, set an error exit code so the world knows about it. This fixes issues where the autobuilder doesn't notice these failures. [YOCTO #7265] (From OE-Core rev: b219377defc9517af360986352bd7da1a7906f10) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com>
-rwxr-xr-xscripts/send-error-report6
1 files changed, 5 insertions, 1 deletions
diff --git a/scripts/send-error-report b/scripts/send-error-report
index c99d3876d7..01c292ead1 100755
--- a/scripts/send-error-report
+++ b/scripts/send-error-report
@@ -62,6 +62,7 @@ def sendData(json_file, server):
g.write(email + "\n")
else:
print("Invalid inputs, try again.")
+ sys.exit(1)
return
with open(json_file) as f:
@@ -74,6 +75,7 @@ def sendData(json_file, server):
data = json.dumps(jsondata, indent=4, sort_keys=True)
except:
print("Invalid json data")
+ sys.exit(1)
return
try:
@@ -87,12 +89,14 @@ def sendData(json_file, server):
print("There was a problem submiting your data, response written in %s.response.html" % json_file)
with open("%s.response.html" % json_file, "w") as f:
f.write(res)
+ sys.exit(1)
conn.close()
except Exception as e:
print("Server connection failed: %s" % e)
-
+ sys.exit(1)
else:
print("No data file found.")
+ sys.exit(1)
if __name__ == '__main__':