Mercurial > traipse_dev
comparison orpg/mapper/map_msg.py @ 19:78407d627cba traipse_dev
Beginning of Code Clean-up. Some code untested, may break!
author | sirebral |
---|---|
date | Sat, 25 Jul 2009 17:24:40 -0500 |
parents | 4385a7d0efd1 |
children | 072ffc1d466f |
comparison
equal
deleted
inserted
replaced
18:67b900deb35c | 19:78407d627cba |
---|---|
84 except Exception, e: | 84 except Exception, e: |
85 print "map_msg.init_from_dom() exception: "+str(e) | 85 print "map_msg.init_from_dom() exception: "+str(e) |
86 continue | 86 continue |
87 else: | 87 else: |
88 self.p_lock.release() | 88 self.p_lock.release() |
89 raise Exception, "Error attempting to initialize a " + self.tagname + " from a non-<" + self.tagname + "/> element" | 89 raise Exception, |
90 "Error attempting to initialize a " + self.tagname + " from a non-<" + self.tagname + "/> element" | |
90 self.p_lock.release() | 91 self.p_lock.release() |
91 | 92 |
92 def set_from_dom(self,xml_dom): | 93 def set_from_dom(self,xml_dom): |
93 self.p_lock.acquire() | 94 self.p_lock.acquire() |
94 if xml_dom.tagName == self.tagname: | 95 if xml_dom.tagName == self.tagname: |
121 except Exception, e: | 122 except Exception, e: |
122 print "map_msg.set_from_dom() exception: "+str(e) | 123 print "map_msg.set_from_dom() exception: "+str(e) |
123 continue | 124 continue |
124 else: | 125 else: |
125 self.p_lock.release() | 126 self.p_lock.release() |
126 raise Exception, "Error attempting to set a " + self.tagname + " from a non-<" + self.tagname + "/> element in map" | 127 raise Exception, |
128 "Error attempting to set a " + self.tagname + " from a non-<" + self.tagname + "/> element in map" | |
127 self.p_lock.release() | 129 self.p_lock.release() |
128 | 130 |
129 def get_all_xml(self, action="new", output_action=1): | 131 def get_all_xml(self, action="new", output_action=1): |
130 return map_element_msg_base.get_all_xml(self, action, output_action) | 132 return map_element_msg_base.get_all_xml(self, action, output_action) |
131 | 133 |