Skip to content

Commit

Permalink
Merge pull request #501 from kyleam/version-unknown
Browse files Browse the repository at this point in the history
BF: Don't fail if etelemetry.get_project returns None
  • Loading branch information
yarikoptic authored Mar 31, 2021
2 parents 711d403 + b73f217 commit a5e6718
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions heudiconv/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -252,16 +252,16 @@ def workflow(*, dicom_dir_template=None, files=None, subjs=None,

outdir = op.abspath(outdir)

latest = None
try:
import etelemetry
latest = etelemetry.get_project("nipy/heudiconv")
except Exception as e:
lgr.warning("Could not check for version updates: %s", str(e))
latest = {"version": 'Unknown'}

lgr.info(INIT_MSG(packname=__packagename__,
version=__version__,
latest=latest["version"]))
latest=(latest or {}).get("version", "Unknown")))

if command:
process_extra_commands(outdir, command, files, dicom_dir_template,
Expand Down

0 comments on commit a5e6718

Please sign in to comment.