pointing old generator to genpy

This commit is contained in:
Ken Conley 2012-01-05 02:40:53 +00:00
parent 010df83e1e
commit 738ae45374
1 changed files with 4 additions and 4 deletions

View File

@ -920,7 +920,7 @@ def deserialize_fn_generator(package, spec, is_numpy=False):
yield " return self"
yield "except struct.error as e:"
yield " raise roslib.message.DeserializationError(e) #most likely buffer underfill"
yield " raise genpy.DeserializationError(e) #most likely buffer underfill"
def msg_generator(package, name, spec):
"""
@ -956,7 +956,7 @@ def msg_generator(package, name, spec):
clear_patterns()
yield '"""autogenerated by genmsg_py from %s.msg. Do not edit."""'%name
yield 'import roslib.message\nimport struct\n'
yield 'import genpy\nimport struct\n'
import_strs = []
for t in spec.types:
import_strs.extend(compute_import(package, t))
@ -970,7 +970,7 @@ def msg_generator(package, name, spec):
fulltype = '%s%s%s'%(package, roslib.msgs.SEP, name)
#Yield data class first, e.g. Point2D
yield 'class %s(roslib.message.Message):'%name
yield 'class %s(genpy.Message):'%name
yield ' _md5sum = "%s"'%(md5sum)
yield ' _type = "%s"'%(fulltype)
yield ' _has_header = %s #flag to mark the presence of a Header object'%spec.has_header()
@ -1085,7 +1085,7 @@ def msg_generator(package, name, spec):
# #1807 : this will be much cleaner when msggenerator library is
# rewritten to not use globals
yield '_struct_I = roslib.message.struct_I'
yield '_struct_I = genpy.struct_I'
patterns = get_patterns()
for p in set(patterns):
# I patterns are already optimized