]> git.decadent.org.uk Git - dak.git/commitdiff
Replace deprecated sys.exc_type and sys.exc_value.
authorTorsten Werner <twerner@debian.org>
Wed, 24 Aug 2011 18:38:25 +0000 (20:38 +0200)
committerTorsten Werner <twerner@debian.org>
Wed, 24 Aug 2011 18:38:25 +0000 (20:38 +0200)
This is deprecated since Python 1.5!

Signed-off-by: Torsten Werner <twerner@debian.org>
dak/clean_queues.py
daklib/queue.py

index 4147ab054533245ad21aab8cd8d0ae6c9dd8b182..e6e4f76cb32b23b77da55885e8d9022d95e10bb6 100755 (executable)
@@ -157,7 +157,7 @@ def flush_orphans ():
             changes = utils.parse_changes(changes_filename)
             files = utils.build_file_list(changes)
         except:
-            utils.warn("error processing '%s'; skipping it. [Got %s]" % (changes_filename, sys.exc_type))
+            utils.warn("error processing '%s'; skipping it. [Got %s]" % (changes_filename, sys.exc_info()[0]))
             continue
 
         dsc_files = {}
@@ -167,7 +167,7 @@ def flush_orphans ():
                     dsc = utils.parse_changes(f, dsc_file=1)
                     dsc_files = utils.build_file_list(dsc, is_a_dsc=1)
                 except:
-                    utils.warn("error processing '%s'; skipping it. [Got %s]" % (f, sys.exc_type))
+                    utils.warn("error processing '%s'; skipping it. [Got %s]" % (f, sys.exc_info()[0]))
                     continue
 
         # Ensure all the files we've seen aren't deleted
index fa4a95f4b33354ab2d47a8b03baeb20dd02b1e4e..f6593394645c2c385fbf5ead34830b2bc83c5422 100755 (executable)
@@ -714,7 +714,7 @@ class Upload(object):
         try:
             control = apt_pkg.ParseSection(apt_inst.debExtractControl(deb_file))
         except:
-            self.rejects.append("%s: debExtractControl() raised %s." % (f, sys.exc_type))
+            self.rejects.append("%s: debExtractControl() raised %s." % (f, sys.exc_info()[0]))
             deb_file.close()
             # Can't continue, none of the checks on control would work.
             return
@@ -1654,7 +1654,7 @@ class Upload(object):
                         self.rejects.append("%s: has %s file(s) with a time stamp too ancient (e.g. %s [%s])."
                                % (filename, num_ancient_files, ancient_file, time.ctime(ancient_date)))
                 except:
-                    self.rejects.append("%s: deb contents timestamp check failed [%s: %s]" % (filename, sys.exc_type, sys.exc_value))
+                    self.rejects.append("%s: deb contents timestamp check failed [%s: %s]" % (filename, sys.exc_info()[0], sys.exc_info()[1]))
 
     def check_if_upload_is_sponsored(self, uid_email, uid_name):
         uid_email = '@'.join(uid_email.split('@')[:2])