* [PATCH] scripts, lib: Don't limit traceback lengths to arbitrary values
@ 2016-03-31 11:46 Richard Purdie
2016-03-31 14:42 ` Peter Kjellerstedt
0 siblings, 1 reply; 2+ messages in thread
From: Richard Purdie @ 2016-03-31 11:46 UTC (permalink / raw)
To: openembedded-core
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]
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
diff --git a/meta/files/ext-sdk-prepare.py b/meta/files/ext-sdk-prepare.py
index 7887696..80db8bb 100644
--- a/meta/files/ext-sdk-prepare.py
+++ b/meta/files/ext-sdk-prepare.py
@@ -94,5 +94,5 @@ if __name__ == "__main__":
except Exception:
ret = 1
import traceback
- traceback.print_exc(5)
+ traceback.print_exc()
sys.exit(ret)
diff --git a/meta/lib/oeqa/runexported.py b/meta/lib/oeqa/runexported.py
index dba0d7a..e9a2912 100755
--- a/meta/lib/oeqa/runexported.py
+++ b/meta/lib/oeqa/runexported.py
@@ -140,5 +140,5 @@ if __name__ == "__main__":
except Exception:
ret = 1
import traceback
- traceback.print_exc(5)
+ traceback.print_exc()
sys.exit(ret)
diff --git a/scripts/cleanup-workdir b/scripts/cleanup-workdir
index a7f5a3a..01ebd52 100755
--- a/scripts/cleanup-workdir
+++ b/scripts/cleanup-workdir
@@ -194,5 +194,5 @@ if __name__ == '__main__':
except Exception:
ret = 2
import traceback
- traceback.print_exc(3)
+ traceback.print_exc()
sys.exit(ret)
diff --git a/scripts/combo-layer b/scripts/combo-layer
index 09a53a2..9127041 100755
--- a/scripts/combo-layer
+++ b/scripts/combo-layer
@@ -920,5 +920,5 @@ if __name__ == "__main__":
except Exception:
ret = 1
import traceback
- traceback.print_exc(5)
+ traceback.print_exc()
sys.exit(ret)
diff --git a/scripts/devtool b/scripts/devtool
index 06e91b7..e1198b1 100755
--- a/scripts/devtool
+++ b/scripts/devtool
@@ -318,5 +318,5 @@ if __name__ == "__main__":
except Exception:
ret = 1
import traceback
- traceback.print_exc(5)
+ traceback.print_exc()
sys.exit(ret)
diff --git a/scripts/oe-publish-sdk b/scripts/oe-publish-sdk
index 1729a0d..2b6e9bc 100755
--- a/scripts/oe-publish-sdk
+++ b/scripts/oe-publish-sdk
@@ -150,5 +150,5 @@ if __name__ == "__main__":
except Exception:
ret = 1
import traceback
- traceback.print_exc(5)
+ traceback.print_exc()
sys.exit(ret)
diff --git a/scripts/oe-selftest b/scripts/oe-selftest
index 9b61bfa..9b29ae0 100755
--- a/scripts/oe-selftest
+++ b/scripts/oe-selftest
@@ -630,7 +630,7 @@ if __name__ == "__main__":
except Exception:
ret = 1
import traceback
- traceback.print_exc(5)
+ traceback.print_exc()
finally:
remove_include()
remove_inc_files()
diff --git a/scripts/recipetool b/scripts/recipetool
index 1198cc2..6c66487 100755
--- a/scripts/recipetool
+++ b/scripts/recipetool
@@ -117,5 +117,5 @@ if __name__ == "__main__":
except Exception:
ret = 1
import traceback
- traceback.print_exc(5)
+ traceback.print_exc()
sys.exit(ret)
diff --git a/scripts/test-remote-image b/scripts/test-remote-image
index 97d03d7..9c5b015 100755
--- a/scripts/test-remote-image
+++ b/scripts/test-remote-image
@@ -357,5 +357,5 @@ if __name__ == "__main__":
except Exception:
ret = 1
import traceback
- traceback.print_exc(5)
+ traceback.print_exc()
sys.exit(ret)
diff --git a/scripts/yocto-bsp b/scripts/yocto-bsp
index 2d9453f..82a050e 100755
--- a/scripts/yocto-bsp
+++ b/scripts/yocto-bsp
@@ -151,6 +151,6 @@ if __name__ == "__main__":
except Exception:
ret = 1
import traceback
- traceback.print_exc(5)
+ traceback.print_exc()
sys.exit(ret)
diff --git a/scripts/yocto-kernel b/scripts/yocto-kernel
index c9b2821..daaad07 100755
--- a/scripts/yocto-kernel
+++ b/scripts/yocto-kernel
@@ -395,5 +395,5 @@ if __name__ == "__main__":
except Exception:
ret = 1
import traceback
- traceback.print_exc(5)
+ traceback.print_exc()
sys.exit(ret)
diff --git a/scripts/yocto-layer b/scripts/yocto-layer
index 313d464..356972e 100755
--- a/scripts/yocto-layer
+++ b/scripts/yocto-layer
@@ -146,6 +146,6 @@ if __name__ == "__main__":
except Exception:
ret = 1
import traceback
- traceback.print_exc(5)
+ traceback.print_exc()
sys.exit(ret)
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH] scripts, lib: Don't limit traceback lengths to arbitrary values
2016-03-31 11:46 [PATCH] scripts, lib: Don't limit traceback lengths to arbitrary values Richard Purdie
@ 2016-03-31 14:42 ` Peter Kjellerstedt
0 siblings, 0 replies; 2+ messages in thread
From: Peter Kjellerstedt @ 2016-03-31 14:42 UTC (permalink / raw)
To: Richard Purdie, openembedded-core
> -----Original Message-----
> From: openembedded-core-bounces@lists.openembedded.org
> [mailto:openembedded-core-bounces@lists.openembedded.org] On Behalf Of
> Richard Purdie
> Sent: den 31 mars 2016 13:47
> To: openembedded-core
> Subject: [OE-core] [PATCH] scripts, lib: 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.
^^^^
Change "look" to "took".
//Peter
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-03-31 14:42 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-03-31 11:46 [PATCH] scripts, lib: Don't limit traceback lengths to arbitrary values Richard Purdie
2016-03-31 14:42 ` Peter Kjellerstedt
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.