[llvm-commits] [zorg] r169935 - /zorg/trunk/zorg/buildbot/PhasedBuilderUtils.py
David Dean
david_dean at apple.com
Tue Dec 11 16:10:57 PST 2012
Author: ddean
Date: Tue Dec 11 18:10:57 2012
New Revision: 169935
URL: http://llvm.org/viewvc/llvm-project?rev=169935&view=rev
Log:
Add a safer method for setting options from local.cfg
Modified:
zorg/trunk/zorg/buildbot/PhasedBuilderUtils.py
Modified: zorg/trunk/zorg/buildbot/PhasedBuilderUtils.py
URL: http://llvm.org/viewvc/llvm-project/zorg/trunk/zorg/buildbot/PhasedBuilderUtils.py?rev=169935&r1=169934&r2=169935&view=diff
==============================================================================
--- zorg/trunk/zorg/buildbot/PhasedBuilderUtils.py (original)
+++ zorg/trunk/zorg/buildbot/PhasedBuilderUtils.py Tue Dec 11 18:10:57 2012
@@ -260,3 +260,13 @@
artifacts_str],
description = ['publish', buildname]))
return f
+
+def set_config_option(section, option, default=False):
+ import warnings
+ if config.options.has_option(section, option):
+ return config.options.get(section, option)
+ else:
+ warn_str = 'Please add the "%s" option to the ' % option
+ warn_str += '"%s" section of your local.cfg file' % section
+ warnings.warn(warn_str)
+ return default
More information about the llvm-commits
mailing list