Mercurial > repos > guerler > springsuite
comparison planemo/lib/python3.7/site-packages/boto/rds/statusinfo.py @ 0:d30785e31577 draft
"planemo upload commit 6eee67778febed82ddd413c3ca40b3183a3898f1"
author | guerler |
---|---|
date | Fri, 31 Jul 2020 00:18:57 -0400 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:d30785e31577 |
---|---|
1 # Copyright (c) 2013 Amazon.com, Inc. or its affiliates. | |
2 # All Rights Reserved | |
3 # | |
4 # Permission is hereby granted, free of charge, to any person obtaining a | |
5 # copy of this software and associated documentation files (the | |
6 # "Software"), to deal in the Software without restriction, including | |
7 # without limitation the rights to use, copy, modify, merge, publish, dis- | |
8 # tribute, sublicense, and/or sell copies of the Software, and to permit | |
9 # persons to whom the Software is furnished to do so, subject to the fol- | |
10 # lowing conditions: | |
11 # | |
12 # The above copyright notice and this permission notice shall be included | |
13 # in all copies or substantial portions of the Software. | |
14 # | |
15 # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS | |
16 # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL- | |
17 # ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT | |
18 # SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, | |
19 # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | |
20 # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS | |
21 # IN THE SOFTWARE. | |
22 # | |
23 | |
24 class StatusInfo(object): | |
25 """ | |
26 Describes a status message. | |
27 """ | |
28 | |
29 def __init__(self, status_type=None, normal=None, status=None, message=None): | |
30 self.status_type = status_type | |
31 self.normal = normal | |
32 self.status = status | |
33 self.message = message | |
34 | |
35 def __repr__(self): | |
36 return 'StatusInfo:%s' % self.message | |
37 | |
38 def startElement(self, name, attrs, connection): | |
39 pass | |
40 | |
41 def endElement(self, name, value, connection): | |
42 if name == 'StatusType': | |
43 self.status_type = value | |
44 elif name == 'Normal': | |
45 if value.lower() == 'true': | |
46 self.normal = True | |
47 else: | |
48 self.normal = False | |
49 elif name == 'Status': | |
50 self.status = value | |
51 elif name == 'Message': | |
52 self.message = value | |
53 else: | |
54 setattr(self, name, value) |