1 """
2 exception classes
3
4 See COPYING for license information.
5 """
6
7
9 """
10 Raised when the remote service returns an error.
11 """
13 self.status = status
14 self.reason = reason
15 Exception.__init__(self)
16
18 return '%d: %s' % (self.status, self.reason)
19
21 return '%d: %s' % (self.status, self.reason)
22
23
25 """
26 Raised on a non-existent Container.
27 """
28 pass
29
30
32 """
33 Raised on a non-existent Object.
34 """
35 pass
36
37
39 """
40 Raised when attempting to delete a Container that still contains Objects.
41 """
43 self.container_name = container_name
44
46 return "Cannot delete non-empty Container %s" % self.container_name
47
49 return "%s(%s)" % (self.__class__.__name__, self.container_name)
50
51
53 """
54 Raised for invalid storage container names.
55 """
56 pass
57
58
60 """
61 Raised for invalid storage object names.
62 """
63 pass
64
65
71
72
78
79
81 """
82 Not a valid url for use with this software.
83 """
84 pass
85
86
88 """
89 Not a valid storage_object size attribute.
90 """
91 pass
92
93
95 """
96 Raised when there is a insufficient amount of data to send.
97 """
98 pass
99
100
102 """
103 Raised when public features of a non-public container are accessed.
104 """
105 pass
106
107
109 """
110 CDN is not enabled for this account.
111 """
112 pass
113
114
116 """
117 Raised on a failure to authenticate.
118 """
119 pass
120
121
123 """
124 Raised when an unspecified authentication error has occurred.
125 """
126 pass
127