summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/toaster/orm
diff options
context:
space:
mode:
authorEd Bartosh <ed.bartosh@linux.intel.com>2016-06-10 12:34:12 +0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-06-15 08:35:06 +0100
commitaa6894a4369dbbd032a98bfe43b285111261efa9 (patch)
tree2fe0bb1b09d1fe1551899bfdbf324c75370fac45 /bitbake/lib/toaster/orm
parenteb634f9e13ade09b4fc7d69801f4d9e21ef03db1 (diff)
downloadpoky-aa6894a4369dbbd032a98bfe43b285111261efa9.tar.gz
bitbake: toaster: fix wrong usage of print_exc and format_exc
First parameter of traceback.print_exc and traceback.format_exc APIs is a 'limit' - a number of stracktraces to print. Passing exception object to print_exc or format_exc is incorrect, but it works in Python 2 and causes printing only one line of traceback. In Python 3 comparison of integer and exception object throws exception: TypeError: unorderable types: int() < <Exception type>() As these APIs are usually used in except block of handling another exception this can cause hard to find and debug bugs. (Bitbake rev: c5a48931ac8db9e56f978c50861c19d0d0c808e3) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/toaster/orm')
-rw-r--r--bitbake/lib/toaster/orm/models.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/bitbake/lib/toaster/orm/models.py b/bitbake/lib/toaster/orm/models.py
index caad2afe81..61737c7979 100644
--- a/bitbake/lib/toaster/orm/models.py
+++ b/bitbake/lib/toaster/orm/models.py
@@ -1217,7 +1217,7 @@ class LayerIndexLayerSource(LayerSource):
1217 import traceback 1217 import traceback
1218 if proxy_settings is not None: 1218 if proxy_settings is not None:
1219 logger.info("EE: Using proxy %s" % proxy_settings) 1219 logger.info("EE: Using proxy %s" % proxy_settings)
1220 logger.warning("EE: could not connect to %s, skipping update: %s\n%s" % (self.apiurl, e, traceback.format_exc(e))) 1220 logger.warning("EE: could not connect to %s, skipping update: %s\n%s" % (self.apiurl, e, traceback.format_exc()))
1221 return 1221 return
1222 1222
1223 # update branches; only those that we already have names listed in the 1223 # update branches; only those that we already have names listed in the