GNOME Bugzilla – Bug 458731
sabayon-apply crashed with TypeError in debug_log_dump_as_list()
Last modified: 2007-08-14 01:03:46 UTC
Steps to reproduce: Run 'sabayon-apply --help', or anything else that raises an exception before managing to set the admin log filename. Likewise for sabayon-session. Stack trace: Traceback (most recent call last):
+ Trace 149412
util.get_admin_log_config_filename ())
debuglog.debug_log_dump_to_file (log_config_filename, sys.stderr)
list = debug_log_dump_as_list (config_filename)
raise TypeError ("config_filename must be a string")
Other information:
See also https://bugs.launchpad.net/ubuntu/+source/sabayon/+bug/127103 where this was originally filed.
Created attachment 92061 [details] [review] set admin log filename earlier; remember to import sabayon.config too
2007-07-20 Colin Watson <cjwatson@ubuntu.com> * admin-tool/sabayon-apply: Import sabayon.config. Set admin log filename earlier so that we don't crash trying to handle exceptions. * admin-tool/sabayon-session: Likewise.
Thanks for catching this and for the patch! I took a simpler solution; start the toplevel "try" block right after the call to option_parser.parse_args(). This way the "except" clause won't run if the option parser does a sys.exit() after being passed --help. 2007-08-13 Federico Mena Quintero <federico@novell.com> * configure.ac: Bumped version number to 2.19.2. * admin-tool/sabayon-apply: Import our config module. * admin-tool/sabayon-session: Likewise. * admin-tool/sabayon-apply (main): Start the toplevel "try" block right after the call to option_parser.parse_args(); if it exits due to being passed --help, we don't want our exception handler to be called. Thanks to Colin Watson <cjwatson@debian.org> for catching this. Fixes http://bugzilla.gnome.org/show_bug.cgi?id=458731 * admin-tool/sabayon-session (main): Likewise. (main): Removed leftover "print" statements for debugging.