fossology / fossology-python

Python wrapper for the Fossology API
https://fossology.github.io/fossology-python
MIT License
17 stars 8 forks source link

NameError: name 'exit' is not defined #122

Closed alpianon closed 9 months ago

alpianon commented 9 months ago

I started playing with the latest version of fossology-python, and when connecting to a wrong server url I got this error:

/data/alberto/playground/fossy_new/lib/python3.10/site-packages/fossology/__init__.py in fossology_token(url, username, password, token_name, token_scope, token_expire)
     78             raise FossologyApiError(description, response)
     79     except requests.exceptions.ConnectionError as error:
---> 80         exit(f"Server {url} does not seem to be running or is unreachable: {error}")
     81 
     82 

NameError: name 'exit' is not defined

The affected line is this one

I don't know if it was intended to be sys.exit or if it should be raising some exception instead