[LNT] r276037 - If the profiles directory does not exist, don't update it

Chris Matthews via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 19 15:12:57 PDT 2016


Author: cmatthews
Date: Tue Jul 19 17:12:56 2016
New Revision: 276037

URL: http://llvm.org/viewvc/llvm-project?rev=276037&view=rev
Log:
If the profiles directory does not exist, don't update it

In my LNT workspaces the profiles directory does not exist, and then
this rule fails.  No need to run it at all if there is no profiles to
process.

Modified:
    lnt/trunk/lnt/server/db/rules/rule_update_profile_stats.py

Modified: lnt/trunk/lnt/server/db/rules/rule_update_profile_stats.py
URL: http://llvm.org/viewvc/llvm-project/lnt/trunk/lnt/server/db/rules/rule_update_profile_stats.py?rev=276037&r1=276036&r2=276037&view=diff
==============================================================================
--- lnt/trunk/lnt/server/db/rules/rule_update_profile_stats.py (original)
+++ lnt/trunk/lnt/server/db/rules/rule_update_profile_stats.py Tue Jul 19 17:12:56 2016
@@ -11,6 +11,9 @@ def update_profile_stats(ts, run_id):
     age_path = os.path.join(config.profileDir, '_profile-age.json')
     profile_path = config.profileDir
 
+    if not os.path.exists(profile_path):
+        return
+
     try:
         history = json.loads(open(history_path).read())
     except:




More information about the llvm-commits mailing list