aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorGeorgy Redkozubov <georgy.redkozubov@linaro.org>2013-04-25 21:00:01 +0400
committerGeorgy Redkozubov <georgy.redkozubov@linaro.org>2013-04-25 21:00:01 +0400
commit4c4a834d722478a61fb9a21e543a51aaeb3fc9a7 (patch)
treeed079dba9ae7e3b263bdca8b4faaedd6f64d3e37 /scripts
parent65945534bb49dc20b234b6786de0c424e50c1462 (diff)
Rewrite exception handling.
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/publish_to_snapshots.py13
1 files changed, 11 insertions, 2 deletions
diff --git a/scripts/publish_to_snapshots.py b/scripts/publish_to_snapshots.py
index 90ac902..6799305 100755
--- a/scripts/publish_to_snapshots.py
+++ b/scripts/publish_to_snapshots.py
@@ -64,7 +64,12 @@ class PublisherArgumentException(Exception):
class BuildInfoException(Exception):
"""BUILD-INFO.txt is absent."""
- pass
+
+ def __init__(self, value):
+ self.value = value
+
+ def __str__(self):
+ return repr(self.value)
class SnapshotsPublisher(object):
@@ -408,7 +413,11 @@ def main():
if build_dir_path is None or target_dir_path is None:
print "Problem with build/target path, move failed"
return FAIL
- publisher.check_buildinfo(build_dir_path, target_dir_path)
+ try:
+ publisher.check_buildinfo(build_dir_path, target_dir_path)
+ except BuildInfoException as e:
+ print e.value
+ return FAIL
ret = publisher.move_artifacts(args, build_dir_path, target_dir_path)
if ret != PASS:
print "Move Failed"