Skip to content

keepalive exception handling not compatible with Python 3 in at least one place #9

@mhearne-usgs

Description

@mhearne-usgs

I'm not directly using keepalive, it is being used by some tool in the conda install chain. The error below occurs when trying to compile keepalive. I believe it is failing because line 240 is not valid Python 3 syntax. I think the correct syntax would be:

except (socket.error, httplib.HTTPException) as err:

pyc file failed to compile successfully (run_command failed)
python_exe_full_path: /Users/user/miniconda/envs/testenv2/bin/python3.7
py_full_path: /Users/user/miniconda/envs/testenv2/lib/python3.7/site-packages/networkx/algorithms/tests/test_structuralholes.py
pyc_full_path: /Users/user/miniconda/envs/testenv2/lib/python3.7/site-packages/keepalive/pycache/keepalive.cpython-37.pyc
compile rc: 1
compile stdout: *** Error compiling 'lib/python3.7/site-packages/keepalive/keepalive.py'...
File "lib/python3.7/site-packages/keepalive/keepalive.py", line 240
except (socket.error, httplib.HTTPException), err:
^
SyntaxError: invalid syntax

compile stderr:

done

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions