Completed
Push — master ( 43645f...f403d7 )
by Makoto
56s
created

tumdlr.TumdlrDownloadError   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 5
Duplicated Lines 0 %
Metric Value
wmc 1
dl 0
loc 5
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A __init__() 0 4 1
1
class TumdlrException(Exception):
2
    pass
3
4
5
###############################
6
# Begin generic errors        #
7
###############################
8
9
class TumdlrParserError(TumdlrException):
10
    def __init__(self, *args, **kwargs):
11
        self.post_data = kwargs.get('post_data')
12
        super().__init__('An error occurred while parsing a posts API response data')
13
14
15
###############################
16
# Begin file container errors #
17
###############################
18
class TumdlrFileError(TumdlrException):
19
    pass
20
21
22
class TumdlrDownloadError(TumdlrFileError):
23
    def __init__(self, *args, **kwargs):
24
        self.download_url   = kwargs.get('download_url')
25
        self.error_message  = kwargs.get('error_message')
26
        super().__init__('An error occurred while downloading a file entry from a post')
27