X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=daklib%2Fdak_exceptions.py;h=b210a6f4f9a0978a09255934c391e17ef393cf05;hb=44610bd50e94e0ef438f87c3e3fb756ed12d65ba;hp=2fe87a0852f1f93aedbe869eda71f73c3a9cd5e9;hpb=bea6330234dd72e54aaed91916c6932566dc1aab;p=dak.git diff --git a/daklib/dak_exceptions.py b/daklib/dak_exceptions.py index 2fe87a08..b210a6f4 100755 --- a/daklib/dak_exceptions.py +++ b/daklib/dak_exceptions.py @@ -1,10 +1,12 @@ #!/usr/bin/env python -""" Exception classes used in dak """ +""" +Exception classes used in dak -# Copyright (C) 2008 Mark Hymers - -################################################################################ +@contact: Debian FTP Master +@copyright: 2008 Mark Hymers +@license: GNU General Public License version 2 or later +""" # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -20,17 +22,19 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -################################################################################ class DakError(Exception): - """Base class for all simple errors in this module. - - Attributes: + """ + Base class for all simple errors in this module. - message -- explanation of the error """ def __init__(self, message=""): + """ + @type message: string + @param message: explanation of the error + + """ Exception.__init__(self) self.args = str(message) self.message = str(message) @@ -40,6 +44,7 @@ class DakError(Exception): __all__ = ['DakError'] +# If you want to have a new exception in dak, add it here. dakerrors = { "ParseMaintError": """Exception raised for errors in parsing a maintainer field.""", "ParseChangesError": """Exception raised for errors in parsing a changes file.""", @@ -53,7 +58,7 @@ dakerrors = { "NoFreeFilenameError": """Exception raised when no alternate filename was found.""", "TransitionsError": """Exception raised when transitions file can't be parsed.""", "NoSourceFieldError": """Exception raised - we cant find the source - wtf?""" -} +} #: All dak exceptions def construct_dak_exception(name, description): class Er(DakError):