Fixing some migration rule bugs

This commit is contained in:
Jeremy Leibs 2010-06-10 23:41:05 +00:00
parent c17f276425
commit bdcd189dad
2 changed files with 5 additions and 1 deletions

View File

@ -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()

View File

@ -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