Codebase list ros-genmsg / aa0e17e
New upstream version 0.5.11 Jochen Sprickerhof 5 years ago
3 changed file(s) with 9 addition(s) and 4 deletion(s). Raw diff Collapse all Expand all
00 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
11 Changelog for package genmsg
22 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
3
4 0.5.11 (2018-05-01)
5 -------------------
6 * use ast.literal_eval instead of eval (`#73 <https://github.com/ros/genmsg/issues/73>`_)
7 * fix undefined name in case of exception (`#75 <https://github.com/ros/genmsg/issues/75>`_)
38
49 0.5.10 (2018-01-25)
510 -------------------
00 <?xml version="1.0"?>
11 <package>
22 <name>genmsg</name>
3 <version>0.5.10</version>
3 <version>0.5.11</version>
44 <description>
55 Standalone Python library for generating ROS message and service data structures for various languages.
66 </description>
3838 possible layouts.
3939 """
4040
41 import ast
4142 import os
4243 import sys
4344
180181 raise InvalidMsgSpec("cannot coerce [%s] to %s (out of bounds)"%(val, field_type))
181182 return val
182183 elif field_type == 'bool':
183 # TODO: need to nail down constant spec for bool
184 return True if eval(val) else False
184 return True if ast.literal_eval(val) else False
185185 raise InvalidMsgSpec("invalid constant type: [%s]"%field_type)
186186
187187 def _load_constant_line(orig_line):
202202 else:
203203 line_splits = [x.strip() for x in ' '.join(line_splits[1:]).split(CONSTCHAR)] #resplit on '='
204204 if len(line_splits) != 2:
205 raise InvalidMsgSpec("Invalid constant declaration: %s"%l)
205 raise InvalidMsgSpec("Invalid constant declaration: %s"%orig_line)
206206 name = line_splits[0]
207207 val = line_splits[1]
208208