dynamist / phabfive

A command line tool to interact with Phabricator
Apache License 2.0
4 stars 2 forks source link

Connection refused exception in diffusion module #30

Open Grokzen opened 4 years ago

Grokzen commented 4 years ago

Environment

Steps to Reproduce

$ PHAB_URL=http://127.0.0.1/api/ phabfive diffusion repo list
Traceback (most recent call last):
  File "/home/mai/.virtualenvs/phabfive-github/bin/phabfive", line 11, in <module>
    load_entry_point('phabfive', 'console_scripts', 'phabfive')()
  File "/home/mai/phabfive-github/phabfive/cli.py", line 176, in cli_entrypoint
    sys.exit(run(cli_args, sub_args))
  File "/home/mai/phabfive-github/phabfive/cli.py", line 139, in run
    d = diffusion.Diffusion()
  File "/home/mai/phabfive-github/phabfive/diffusion.py", line 17, in __init__
    super(Diffusion, self).__init__()
  File "/home/mai/phabfive-github/phabfive/core.py", line 77, in __init__
    self.verify_connection()
  File "/home/mai/phabfive-github/phabfive/core.py", line 83, in verify_connection
    result = self.phab.user.whoami()
  File "/home/mai/.virtualenvs/phabfive-github/local/lib/python2.7/site-packages/phabricator/__init__.py", line 248, in __call__
    return self._request(**kwargs)
  File "/home/mai/.virtualenvs/phabfive-github/local/lib/python2.7/site-packages/phabricator/__init__.py", line 308, in _request
    conn.request('POST', path, body, headers)
  File "/usr/lib/python2.7/httplib.py", line 1042, in request
    self._send_request(method, url, body, headers)
  File "/usr/lib/python2.7/httplib.py", line 1082, in _send_request
    self.endheaders(body)
  File "/usr/lib/python2.7/httplib.py", line 1038, in endheaders
    self._send_output(message_body)
  File "/usr/lib/python2.7/httplib.py", line 882, in _send_output
    self.send(msg)
  File "/usr/lib/python2.7/httplib.py", line 844, in send
    self.connect()
  File "/usr/lib/python2.7/httplib.py", line 821, in connect
    self.timeout, self.source_address)
  File "/usr/lib/python2.7/socket.py", line 575, in create_connection
    raise err
socket.error: [Errno 111] Connection refused

Expected Behavior

Better wrapped exception

Observed Behavior

Badly wrapped exception