New upstream version 0.5.11
Jochen Sprickerhof
5 years ago
0 | 0 |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
1 | 1 |
Changelog for package genmsg
|
2 | 2 |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
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>`_)
|
3 | 8 |
|
4 | 9 |
0.5.10 (2018-01-25)
|
5 | 10 |
-------------------
|
0 | 0 |
<?xml version="1.0"?>
|
1 | 1 |
<package>
|
2 | 2 |
<name>genmsg</name>
|
3 | |
<version>0.5.10</version>
|
|
3 |
<version>0.5.11</version>
|
4 | 4 |
<description>
|
5 | 5 |
Standalone Python library for generating ROS message and service data structures for various languages.
|
6 | 6 |
</description>
|
38 | 38 |
possible layouts.
|
39 | 39 |
"""
|
40 | 40 |
|
|
41 |
import ast
|
41 | 42 |
import os
|
42 | 43 |
import sys
|
43 | 44 |
|
|
180 | 181 |
raise InvalidMsgSpec("cannot coerce [%s] to %s (out of bounds)"%(val, field_type))
|
181 | 182 |
return val
|
182 | 183 |
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
|
185 | 185 |
raise InvalidMsgSpec("invalid constant type: [%s]"%field_type)
|
186 | 186 |
|
187 | 187 |
def _load_constant_line(orig_line):
|
|
202 | 202 |
else:
|
203 | 203 |
line_splits = [x.strip() for x in ' '.join(line_splits[1:]).split(CONSTCHAR)] #resplit on '='
|
204 | 204 |
if len(line_splits) != 2:
|
205 | |
raise InvalidMsgSpec("Invalid constant declaration: %s"%l)
|
|
205 |
raise InvalidMsgSpec("Invalid constant declaration: %s"%orig_line)
|
206 | 206 |
name = line_splits[0]
|
207 | 207 |
val = line_splits[1]
|
208 | 208 |
|