|
5 | 5 | # to you under the Apache License, Version 2.0 (the |
6 | 6 | # "License"); you may not use this file except in compliance |
7 | 7 | # with the License. You may obtain a copy of the License at |
8 | | -# |
| 8 | +# |
9 | 9 | # http://www.apache.org/licenses/LICENSE-2.0 |
10 | | -# |
| 10 | +# |
11 | 11 | # Unless required by applicable law or agreed to in writing, |
12 | 12 | # software distributed under the License is distributed on an |
13 | 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
14 | 14 | # KIND, either express or implied. See the License for the |
15 | 15 | # specific language governing permissions and limitations |
16 | 16 | # under the License. |
17 | 17 |
|
| 18 | + |
18 | 19 | class cloudstackAPIException(Exception): |
19 | | - def __init__(self, cmd = "", result = ""): |
20 | | - self.errorMsg = "Execute cmd: %s failed, due to: %s"%(cmd, result) |
| 20 | + def __init__(self, cmd="", result=""): |
| 21 | + self.errorMsg = "Execute cmd: %s failed, due to: %s" % (cmd, result) |
| 22 | + |
21 | 23 | def __str__(self): |
22 | 24 | return self.errorMsg |
23 | | - |
| 25 | + |
| 26 | + |
24 | 27 | class InvalidParameterException(Exception): |
25 | 28 | def __init__(self, msg=''): |
26 | 29 | self.errorMsg = msg |
| 30 | + |
27 | 31 | def __str__(self): |
28 | 32 | return self.errorMsg |
29 | | - |
| 33 | + |
| 34 | + |
30 | 35 | class dbException(Exception): |
31 | 36 | def __init__(self, msg=''): |
32 | 37 | self.errorMsg = msg |
| 38 | + |
33 | 39 | def __str__(self): |
34 | 40 | return self.errorMsg |
35 | | - |
| 41 | + |
| 42 | + |
36 | 43 | class internalError(Exception): |
37 | 44 | def __init__(self, msg=''): |
38 | 45 | self.errorMsg = msg |
| 46 | + |
39 | 47 | def __str__(self): |
40 | 48 | return self.errorMsg |
0 commit comments