]> git.decadent.org.uk Git - dak.git/blobdiff - daklib/utils.py
Add an exception class and adjust the scripts using ParseMaintError to use the new...
[dak.git] / daklib / utils.py
old mode 100644 (file)
new mode 100755 (executable)
index a094788..d05719f
@@ -25,6 +25,7 @@ import codecs, commands, email.Header, os, pwd, re, select, socket, shutil, \
        sys, tempfile, traceback
 import apt_pkg
 import database
+from dak_exceptions import *
 
 ################################################################################
 
@@ -67,23 +68,6 @@ key_uid_email_cache = {}
 
 ################################################################################
 
-class Error(Exception):
-    """Base class for exceptions in this module."""
-    pass
-
-class ParseMaintError(Error):
-    """Exception raised for errors in parsing a maintainer field.
-
-    Attributes:
-       message -- explanation of the error
-    """
-
-    def __init__(self, message):
-        self.args = message,
-        self.message = message
-
-################################################################################
-
 def open_file(filename, mode='r'):
     try:
         f = open(filename, mode)