aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorDanilo Segan <danilo@canonical.com>2012-02-28 10:41:59 +0100
committerDanilo Segan <danilo@canonical.com>2012-02-28 10:41:59 +0100
commitb397ab606edb2f130a2e5ad0986da2948c4a1407 (patch)
treec3c385b0eddf99eb9419a39eeed365e68c6aa793 /scripts
parent76ba254e614b5a4a785ea613284d32eaeafa9e34 (diff)
Process invalid/valid parameters to the run method.
Diffstat (limited to 'scripts')
-rw-r--r--scripts/publish_to_snapshots.py17
1 files changed, 16 insertions, 1 deletions
diff --git a/scripts/publish_to_snapshots.py b/scripts/publish_to_snapshots.py
index 5794c55..08a62ff 100644
--- a/scripts/publish_to_snapshots.py
+++ b/scripts/publish_to_snapshots.py
@@ -1,7 +1,22 @@
#!/usr/bin/env python
-class SnapshotsPublisher(object):
+import optparse
+
+
+class InvalidParametersException(Exception):
pass
+acceptable_job_types = [
+ 'android',
+ 'kernel-hwpack',
+ ]
+
+class SnapshotsPublisher(object):
+ def run(self, arguments):
+ if (arguments is None or len(arguments) < 3 or
+ arguments[0] not in acceptable_job_types):
+ raise InvalidParametersException
+
+
if __name__ == '__main__':
pass