Skip to contentSkip to conversation

bitbake: Don't limit traceback lengths to arbitrary values

PATCH New Richard Purdie 1 participant 1 message Mar 31, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 bitbake: Don't limit traceback lengths to arbitrary values

There appears to have been a lot of copy and pasting of the code which prints tracebacks upon failure and limits the stack trace to 5 entries. This obscures the real error and is very confusing to the user it look me an age to work out why some tracebacks weren't useful.

This patch removes the limit, making tracebacks much more useful for debugging.

[YOCTO #9230]

bitbake/bin/bitbake-layers +1 -1
index fb13044..d47a669 100755
@@ -1068,5 +1068,5 @@ if __name__ == "__main__":
     except Exception:
         ret = 1
         import traceback
-        traceback.print_exc(5)
+        traceback.print_exc()
     sys.exit(ret)
bitbake/bin/bitbake-prserv +1 -1
index a8d7acb..0382144 100755
@@ -50,6 +50,6 @@ if __name__ == "__main__":
     except Exception:
         ret = 1
         import traceback
-        traceback.print_exc(5)
+        traceback.print_exc()
     sys.exit(ret)
 
bitbake/bin/image-writer +1 -1
index 7d71167..e30ab45 100755
@@ -119,4 +119,4 @@ if __name__ == '__main__':
         gtk.main()
     except Exception:
         import traceback
-        traceback.print_exc(3)
+        traceback.print_exc()
bitbake/lib/toaster/contrib/tts/toasteruitest/run_toastertests.py +1 -1
index 2b312cb..754636f 100755
@@ -146,7 +146,7 @@ if __name__ == "__main__":
     except:
         ret = 1
         import traceback
-        traceback.print_exc(5)
+        traceback.print_exc()
     finally:
         if os.getenv('TOASTER_SUITE'):
             del os.environ['TOASTER_SUITE']