[llvm-commits] [zorg] r169884 - /zorg/trunk/zorg/buildbot/Artifacts.py

David Dean david_dean at apple.com
Tue Dec 11 09:09:22 PST 2012


Author: ddean
Date: Tue Dec 11 11:09:22 2012
New Revision: 169884

URL: http://llvm.org/viewvc/llvm-project?rev=169884&view=rev
Log:
Update Artifacts.py to use default values when the ones we use aren't in the local.cfg file.

Modified:
    zorg/trunk/zorg/buildbot/Artifacts.py

Modified: zorg/trunk/zorg/buildbot/Artifacts.py
URL: http://llvm.org/viewvc/llvm-project/zorg/trunk/zorg/buildbot/Artifacts.py?rev=169884&r1=169883&r2=169884&view=diff
==============================================================================
--- zorg/trunk/zorg/buildbot/Artifacts.py (original)
+++ zorg/trunk/zorg/buildbot/Artifacts.py Tue Dec 11 11:09:22 2012
@@ -5,22 +5,25 @@
 from zorg.buildbot.PhasedBuilderUtils import setProperty, determine_phase_id
 
 # Get some parameters about where to upload and download results from.
-is_production = config.options.get('Master Options', 'is_production')
-if is_production:
-    rsync_user = config.options.get('Master Options', 'rsync_user')
-    master_name = config.options.get('Master Options', 'master_name')
-    master_protocol = config.options.get('Master Options', 'master_protocol')
 
-    base_download_url = '%s://%s/artifacts' % (master_protocol, master_name)
-    package_url = 'http://smooshlab.apple.com/packages'
-else:
-    # If we aren't in production mode, assume that we are just using a local
-    # user.
-    import getpass
-    rsync_user = getpass.getuser()
-    master_name = 'localhost'
-    base_download_url = 'http://%s/~%s/artifacts' % (master_name, rsync_user)
-    package_url = 'http://%s/~%s/packages' % (master_name, rsync_user)
+# Set up defaults assuming we aren't in  production mode which
+# assume that we are just using a local user.
+import getpass
+rsync_user = getpass.getuser()
+master_name = 'localhost'
+base_download_url = 'http://%s/~%s/artifacts' % (master_name, rsync_user)
+package_url = 'http://%s/~%s/packages' % (master_name, rsync_user)
+
+try:
+    is_production = config.options.get('Master Options', 'is_production')
+    if is_production:
+        rsync_user = config.options.get('Master Options', 'rsync_user')
+        master_name = config.options.get('Master Options', 'master_name')
+        master_protocol = config.options.get('Master Options', 'master_protocol')
+        base_download_url = '%s://%s/artifacts' % (master_protocol, master_name)
+        package_url = 'http://smooshlab.apple.com/packages'
+except AttributeError:
+    warning('Please update your local.cfg file') 
 
 base_rsync_path = rsync_user + '@' + master_name + ':'
 # TODO: Fix this up. Quick hack to get smooshbase up.





More information about the llvm-commits mailing list