[rtems-tools commit] rtems-bsp-builder: Fix access when there are no messages.

Chris Johns chrisj at rtems.org
Wed Apr 26 00:01:57 UTC 2017


Module:    rtems-tools
Branch:    master
Commit:    c2df65bcf608b31d89d6d346c00dd7f0c217f43f
Changeset: http://git.rtems.org/rtems-tools/commit/?id=c2df65bcf608b31d89d6d346c00dd7f0c217f43f

Author:    Chris Johns <chrisj at rtems.org>
Date:      Wed Apr 26 20:01:23 2017 +1000

rtems-bsp-builder: Fix access when there are no messages.

---

 tester/rt/check.py | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/tester/rt/check.py b/tester/rt/check.py
index b39a0bb..ac8917c 100755
--- a/tester/rt/check.py
+++ b/tester/rt/check.py
@@ -321,11 +321,17 @@ class warnings_errors:
         self.messages = { 'warnings' : { }, 'errors' : { } }
 
     def get_warning_messages(self, arch = None, bsp = None, build = None):
-        messages = self.messages['warnings'][self._key(arch, bsp, build)]
+        key = self._key(arch, bsp, build)
+        if key not in self.messages['warnings']:
+            return []
+        messages = self.messages['warnings'][key]
         return ['%s %s' % (m, messages[m]) for m in messages]
 
     def get_error_messages(self, arch = None, bsp = None, build = None):
-        messages = self.messages['errors'][self._key(arch, bsp, build)]
+        key = self._key(arch, bsp, build)
+        if key not in self.messages['errors']:
+            return []
+        messages = self.messages['errors'][key]
         return ['%s %s' % (m, messages[m]) for m in messages]
 
     def output(self, text):




More information about the vc mailing list