Skip to content

Commit

Permalink
Fix Python 3 incompatibility.
Browse files Browse the repository at this point in the history
  • Loading branch information
kfindeisen committed Nov 29, 2017
1 parent 0f69e17 commit 29f1020
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions python/lsst/ap/pipe/ap_pipe.py
Original file line number Diff line number Diff line change
Expand Up @@ -850,6 +850,10 @@ def _deStringDataId(dataId):
dataId: `dict`
The dataId to be cleaned up.
'''
try:
basestring
except NameError:
basestring = str
integer = re.compile('^\s*[+-]?\d+\s*$')
for key, value in dataId.items():
if isinstance(value, basestring) and integer.match(value) is not None:
Expand Down

0 comments on commit 29f1020

Please sign in to comment.