Improve the handling of the database
Try to reopen the connection when resetting it fails. Give error messages instead of tracebacks on errors. Factor out common code into functions. Hopefully fixes this Traceback (most recent call last): File ".../bin/compare-source-package-list", line 1163, in <module> files, patches, links, new = process_sources(source_entries, lists_dir) File ".../bin/compare-source-package-list", line 1141, in process_sources actions = check_source_package(source_entry, srcpkg) File ".../bin/compare-source-package-list", line 1090, in check_source_package derived_from = find_derived_from(tmp_dir, name, version, dsc_name, dsc_sha1, parts_unmodified) File ".../bin/compare-source-package-list", line 830, in find_derived_from part_derived_from = sha1_to_srcpkgs(part_sha1) File ".../bin/compare-source-package-list", line 549, in sha1_to_srcpkgs database_error(e) File ".../bin/compare-source-package-list", line 526, in database_error conn.reset() psycopg2.InterfaceError: connection already closed
Loading
Please register or sign in to comment