[Lldb-commits] [lldb] r244663 - Don't crash if the file we want to touch doesn't exist.

Greg Clayton via lldb-commits lldb-commits at lists.llvm.org
Tue Aug 11 14:01:32 PDT 2015


Author: gclayton
Date: Tue Aug 11 16:01:32 2015
New Revision: 244663

URL: http://llvm.org/viewvc/llvm-project?rev=244663&view=rev
Log:
Don't crash if the file we want to touch doesn't exist.


Modified:
    lldb/trunk/test/dosep.py

Modified: lldb/trunk/test/dosep.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/dosep.py?rev=244663&r1=244662&r2=244663&view=diff
==============================================================================
--- lldb/trunk/test/dosep.py (original)
+++ lldb/trunk/test/dosep.py Tue Aug 11 16:01:32 2015
@@ -305,9 +305,8 @@ def getDefaultTimeout(platform_name):
     else:
         return "4m"
 
-
 def touch(fname, times=None):
-    with open(fname, 'a'):
+    if os.path.exists(fname):
         os.utime(fname, times)
 
 def find(pattern, path):




More information about the lldb-commits mailing list