Fixing some migration rule bugs
This commit is contained in:
parent
c17f276425
commit
bdcd189dad
|
@ -75,7 +75,7 @@ if __name__ == '__main__':
|
|||
else:
|
||||
append_rule = []
|
||||
|
||||
f = open(sys.argv[1])
|
||||
f = open(args[0])
|
||||
if f is None:
|
||||
print >> sys.stderr, 'Could not open message full definition: %s'
|
||||
sys.exit()
|
||||
|
|
|
@ -260,6 +260,8 @@ class MessageUpdateRule(object):
|
|||
|
||||
# Instantiate types dynamically based on definition
|
||||
try:
|
||||
if self.old_type == "":
|
||||
raise Exception
|
||||
self.old_types = roslib.genpy.generate_dynamic(self.old_type, self.old_full_text)
|
||||
self.old_class = self.old_types[self.old_type]
|
||||
self.old_md5sum = self.old_class._md5sum
|
||||
|
@ -269,6 +271,8 @@ class MessageUpdateRule(object):
|
|||
self.old_md5sum = ""
|
||||
|
||||
try:
|
||||
if self.new_type == "":
|
||||
raise Exception
|
||||
self.new_types = roslib.genpy.generate_dynamic(self.new_type, self.new_full_text)
|
||||
self.new_class = self.new_types[self.new_type]
|
||||
self.new_md5sum = self.new_class._md5sum
|
||||
|
|
Loading…
Reference in New Issue