[Lsb-messages] /var/www/bzr/lsb/devel/buildbot-config r264: Do some sanity checking on cmdline of start_lsb_build.
Jeff Licquia
licquia at linuxfoundation.org
Mon Jun 25 15:49:50 UTC 2012
------------------------------------------------------------
revno: 264
committer: Jeff Licquia <licquia at linuxfoundation.org>
branch nick: buildbot-config
timestamp: Mon 2012-06-25 10:49:50 -0500
message:
Do some sanity checking on cmdline of start_lsb_build.
modified:
cmdline/start_lsb_build
-------------- next part --------------
=== modified file 'cmdline/start_lsb_build'
--- a/cmdline/start_lsb_build 2012-05-04 02:42:01 +0000
+++ b/cmdline/start_lsb_build 2012-06-25 15:49:50 +0000
@@ -39,6 +39,14 @@
branch_name = args[0]
projects = ','.join(args[1:])
+ # Do some argument sanity-checking.
+
+ if len(args) < 2:
+ raise RuntimeError, \
+ "must specify a branch name and one or more projects"
+ if branch_name != "devel" and branch_name[0] not in ['3', '4', '5']:
+ raise RuntimeError, "unrecognized branch name"
+
# Create the job file in memory.
jobfile = StringIO.StringIO()
@@ -62,4 +70,8 @@
output_file.close()
if __name__ == "__main__":
- main()
+ try:
+ main()
+ except RuntimeError:
+ sys.stderr.write(str(sys.exc_info()[1]) + "\n")
+ sys.exit(1)
More information about the lsb-messages
mailing list