DarkEnergySurvey / ugali

Ultra-faint galaxy likelihood toolkit
MIT License
14 stars 15 forks source link

Fix string type check for py2/py3 #62

Closed kadrlica closed 4 years ago

kadrlica commented 5 years ago

We need a more robust way to check for strings. I think that putting an isstr function in utils.fileio.py like suggested in this answer would be a reasonable solution.

sidneymau commented 5 years ago

This is relevant here: https://github.com/DarkEnergySurvey/ugali/blob/master/ugali/analysis/source.py#L100 where I needed to change if isinstance(srcmdl,str): to if isinstance(srcmdl,(basestring,str,unicode)): since the srcmdl was u'./mcmc/juicy_i_mcmc.yaml' (a unicode string)

kadrlica commented 4 years ago

Closed by #63