Coverage for daklib/dak_exceptions.py: 100%

11 statements  

« prev     ^ index     » next       coverage.py v7.6.0, created at 2026-08-03 16:46 +0000

1""" 

2Exception classes used in dak 

3 

4@contact: Debian FTP Master <ftpmaster@debian.org> 

5@copyright: 2008 Mark Hymers <mhy@debian.org> 

6@license: GNU General Public License version 2 or later 

7""" 

8 

9# This program is free software; you can redistribute it and/or modify 

10# it under the terms of the GNU General Public License as published by 

11# the Free Software Foundation; either version 2 of the License, or 

12# (at your option) any later version. 

13 

14# This program is distributed in the hope that it will be useful, 

15# but WITHOUT ANY WARRANTY; without even the implied warranty of 

16# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 

17# GNU General Public License for more details. 

18 

19# You should have received a copy of the GNU General Public License 

20# along with this program; if not, write to the Free Software 

21# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 

22 

23 

24class DakError(Exception): 

25 """ 

26 Base class for all simple errors in this module. 

27 """ 

28 

29 

30class ParseMaintError(DakError): 

31 "Exception raised for errors in parsing a maintainer field." 

32 

33 

34class ParseChangesError(DakError): 

35 "Exception raised for errors in parsing a changes file." 

36 

37 

38class InvalidDscError(DakError): 

39 "Exception raised for invalid dsc files." 

40 

41 

42class UnknownFormatError(DakError): 

43 "Exception raised for unknown Format: lines in changes files." 

44 

45 

46class NoFilesFieldError(DakError): 

47 """Exception raised for missing files field in dsc/changes.""" 

48 

49 

50class SendmailFailedError(DakError): 

51 "Exception raised when Sendmail invocation failed." 

52 

53 

54class NoFreeFilenameError(DakError): 

55 "Exception raised when no alternate filename was found." 

56 

57 

58class TransitionsError(DakError): 

59 "Exception raised when transitions file can't be parsed." 

60 

61 

62class DBUpdateError(DakError): 

63 "Exception raised - could not update the database" 

64 

65 

66class AlreadyLockedError(DakError): 

67 "Exception raised - package already locked by someone else"