[llvm-commits] [zorg] r125233 - /zorg/trunk/lnt/lnt/util/ImportData.py

Daniel Dunbar daniel at zuster.org
Wed Feb 9 14:55:55 PST 2011


Author: ddunbar
Date: Wed Feb  9 16:55:55 2011
New Revision: 125233

URL: http://llvm.org/viewvc/llvm-project?rev=125233&view=rev
Log:
LNT/ImportData: Allow import to function without a config object.

Modified:
    zorg/trunk/lnt/lnt/util/ImportData.py

Modified: zorg/trunk/lnt/lnt/util/ImportData.py
URL: http://llvm.org/viewvc/llvm-project/zorg/trunk/lnt/lnt/util/ImportData.py?rev=125233&r1=125232&r2=125233&view=diff
==============================================================================
--- zorg/trunk/lnt/lnt/util/ImportData.py (original)
+++ zorg/trunk/lnt/lnt/util/ImportData.py Wed Feb  9 16:55:55 2011
@@ -47,7 +47,7 @@
 
     # Find the email address for this machine's results.
     toAddress = email_config = None
-    if not disable_email:
+    if config and not disable_email:
         email_config = config.databases[db_name].email_config
         if email_config.enabled:
             # Find the machine name.
@@ -75,8 +75,11 @@
 
     reportStartTime = time.time()
     result['report_to_address'] = toAddress
-    NTEmailReport.emailReport(result, db, run,
-                              "%s/db_%s/" % (config.zorgURL, db_name),
+    if config:
+        report_url = "%s/db_%s/" % (config.zorgURL, db_name)
+    else:
+        report_url = 'localhost'
+    NTEmailReport.emailReport(result, db, run, report_url,
                               email_config, toAddress, success, commit)
 
     result['added_machines'] = db.getNumMachines() - numMachines





More information about the llvm-commits mailing list