Skip to content

Commit 3a15f37

Browse files
committed
Catch PicklingError instead of SyntaxError
1 parent c4caec3 commit 3a15f37

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

colcon_python_setup_py/package_identification/python_setup_py.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,8 +137,8 @@ def get_setup_arguments(setup_py):
137137
# filter out any data which doesn't serialize
138138
for key, value in list(data.items()):
139139
try:
140-
pickle.dumps(repr(value))
141-
except SyntaxError:
140+
pickle.dumps(value)
141+
except pickle.PicklingError:
142142
del data[key]
143143
return data
144144

0 commit comments

Comments
 (0)