[Asterisk-code-review] Suppress logging on error loading tests/custom/test.yaml (testsuite[master])

Corey Farrell asteriskteam at digium.com
Sun Dec 6 21:05:21 CST 2015


Corey Farrell has uploaded a new change for review.

  https://gerrit.asterisk.org/1772

Change subject: Suppress logging on error loading tests/custom/test.yaml
......................................................................

Suppress logging on error loading tests/custom/test.yaml

The tests/custom is an optional folder used to load custom tests.
Since this is optional a failure to load the file should not produce
an error message.

Change-Id: I16be347743723fb9dc81e726f16aefb984219d6e
---
M runtests.py
1 file changed, 3 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.asterisk.org:29418/testsuite refs/changes/72/1772/1

diff --git a/runtests.py b/runtests.py
index 638652a..8576d32 100755
--- a/runtests.py
+++ b/runtests.py
@@ -656,7 +656,9 @@
     try:
         f = open(path, "r")
     except IOError:
-        print "Failed to open %s" % path
+        # Ignore errors for the optional tests/custom folder.
+        if path != "tests/custom/tests.yaml":
+            print "Failed to open %s" % path
         return None
     except:
         print "Unexpected error: %s" % sys.exc_info()[0]

-- 
To view, visit https://gerrit.asterisk.org/1772
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I16be347743723fb9dc81e726f16aefb984219d6e
Gerrit-PatchSet: 1
Gerrit-Project: testsuite
Gerrit-Branch: master
Gerrit-Owner: Corey Farrell <git at cfware.com>



More information about the asterisk-code-review mailing list