[Lldb-commits] [PATCH] Ignore IOError from missing child.log.

Ilia K ki.stfu at gmail.com
Mon Apr 6 10:39:26 PDT 2015


================
Comment at: test/tools/lldb-mi/lldbmi_testcase.py:28-31
@@ -27,3 +27,6 @@
             print "\n\nContents of %s:" % self.mylog
-            print open(self.mylog, "r").read()
+            try:
+                print open(self.mylog, "r").read()
+            except IOError:
+                pass
         Base.tearDown(self)
----------------
I'd prefer to not use exceptions where it's not needed. Can we change it to the following?
```
import os.path
if os.path.exists(self.mylog):
    print open(self.mylog, "r").read()
```

http://reviews.llvm.org/D8843

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the lldb-commits mailing list