Bug #23345: Print traceback when exception occurs. Index: univention-updater/conffiles/etc/apt/sources.list.d/18_ucs-online-security.list =================================================================== --- univention-updater/conffiles/etc/apt/sources.list.d/18_ucs-online-security.list (Revision 26130) +++ univention-updater/conffiles/etc/apt/sources.list.d/18_ucs-online-security.list (Arbeitskopie) @@ -2,6 +2,7 @@ @!@ import sys +import traceback from univention.updater import UniventionUpdater try: @@ -13,9 +14,10 @@ print '# The online repository is disabled and can be enabled with:' print '# univention-config-registry set repository/online=true' print '' -except: +except Exception: print '# An error occurred during the repository check. The error message:' - print '# %s: %s' % sys.exc_info()[:2] + for line in traceback.format_exception(*sys.exc_info()): + print '# %s' % line print '#' print '' print '# After fixing this issue, you should rewrite this file with the following command:' Index: univention-updater/conffiles/etc/apt/sources.list.d/20_ucs-online-component.list =================================================================== --- univention-updater/conffiles/etc/apt/sources.list.d/20_ucs-online-component.list (Revision 26130) +++ univention-updater/conffiles/etc/apt/sources.list.d/20_ucs-online-component.list (Arbeitskopie) @@ -2,6 +2,7 @@ @!@ import sys +import traceback from univention.updater import UniventionUpdater try: @@ -13,9 +14,10 @@ print '# The online repository is disabled and can be enabled with:' print '# univention-config-registry set repository/online=true' print '' -except: +except Exception: print '# An error occurred during the repository check. The error message:' - print '# %s: %s' % sys.exc_info()[:2] + for line in traceback.format_exception(*sys.exc_info()): + print '# %s' % line print '#' print '' print '# After fixing this issue, you should rewrite this file with the following command:' Index: univention-updater/conffiles/etc/apt/sources.list.d/15_ucs-online-version.list =================================================================== --- univention-updater/conffiles/etc/apt/sources.list.d/15_ucs-online-version.list (Revision 26130) +++ univention-updater/conffiles/etc/apt/sources.list.d/15_ucs-online-version.list (Arbeitskopie) @@ -2,6 +2,7 @@ @!@ import sys +import traceback from univention.updater import UniventionUpdater try: @@ -13,9 +14,10 @@ print '# The online repository is disabled and can be enabled with:' print '# univention-config-registry set repository/online=true' print '' -except: +except Exception: print '# An error occurred during the repository check. The error message:' - print '# %s: %s' % sys.exc_info()[:2] + for line in traceback.format_exception(*sys.exc_info()): + print '# %s' % line print '#' print '' print '# After fixing this issue, you should rewrite this file with the following command:' Index: univention-updater/conffiles/etc/apt/mirror.list =================================================================== --- univention-updater/conffiles/etc/apt/mirror.list (Revision 26130) +++ univention-updater/conffiles/etc/apt/mirror.list (Arbeitskopie) @@ -11,7 +11,7 @@ @!@ import sys - +import traceback from univention.updater import UniventionMirror, UCS_Version try: @@ -30,9 +30,10 @@ print mirror.print_version_repositories( clean = True, dists = False, start = start, end = end ) print mirror.print_security_repositories( clean = True, start = start, end = end, all_security_updates = True ) print mirror.print_component_repositories(clean=True, start=start, end=end, for_mirror_list=True) -except: +except Exception: print '# An error occurred during the repository check. The error message:' - print '# %s: %s' % sys.exc_info()[:2] + for line in traceback.format_exception(*sys.exc_info()): + print '# %s' % line print '#' print '' print '# After fixing this issue, you should rewrite this file with the following command:'