1 """
2 exception classes
3
4 See COPYING for license information.
5 """
6
8 """
9 Raised when the remote service returns an error.
10 """
12 self.status = status
13 self.reason = reason
14 Exception.__init__(self)
15
17 return '%d: %s' % (self.status, self.reason)
18
20 return '%d: %s' % (self.status, self.reason)
21
23 """
24 Raised on a non-existent Container.
25 """
26 pass
27
29 """
30 Raised on a non-existent Object.
31 """
32 pass
33
35 """
36 Raised when attempting to delete a Container that still contains Objects.
37 """
39 self.container_name = container_name
40
42 return "Cannot delete non-empty Container %s" % self.container_name
43
45 return "%s(%s)" % (self.__class__.__name__, self.container_name)
46
48 """
49 Raised for invalid storage container names.
50 """
51 pass
52
54 """
55 Raised for invalid storage object names.
56 """
57 pass
58
64
70
72 """
73 Not a valid url for use with this software.
74 """
75 pass
76
78 """
79 Not a valid storage_object size attribute.
80 """
81 pass
82
84 """
85 Raised when there is a insufficient amount of data to send.
86 """
87 pass
88
90 """
91 Raised when public features of a non-public container are accessed.
92 """
93 pass
94
96 """
97 CDN is not enabled for this account.
98 """
99 pass
100
102 """
103 Raised on a failure to authenticate.
104 """
105 pass
106
108 """
109 Raised when an unspecified authentication error has occurred.
110 """
111 pass
112