[Bug 709705] [NEW] [sponsor-patch] Ugly error message while computer has been disconnected from internet

Artur Rona ari-tczew at ubuntu.com
Sat Jan 29 11:28:38 UTC 2011


Public bug reported:

Binary package hint: ubuntu-dev-tools

sponsor-patch shows very ugly message when computer is loosing
connection with internet. Probably for other scripts this message could
be improved.

Traceback (most recent call last):
  File "/usr/bin/sponsor-patch", line 120, in <module>
    main()
  File "/usr/bin/sponsor-patch", line 111, in main
    options.upload, workdir, options.verbose)
  File "/usr/lib/python2.7/dist-packages/ubuntutools/sponsor_patch/sponsor_patch.py", line 395, in sponsor_patch
    ubuntu = launchpad.distributions['ubuntu']
  File "/usr/lib/python2.7/dist-packages/lazr/restfulclient/resource.py", line 933, in __getitem__
    shim_resource._ensure_representation()
  File "/usr/lib/python2.7/dist-packages/lazr/restfulclient/resource.py", line 342, in _ensure_representation
    representation = self._root._browser.get(self._wadl_resource)
  File "/usr/lib/python2.7/dist-packages/lazr/restfulclient/_browser.py", line 291, in get
    response, content = self._request(url, extra_headers=headers)
  File "/usr/lib/python2.7/dist-packages/lazr/restfulclient/_browser.py", line 242, in _request
    str(url), method=method, body=data, headers=headers)
  File "/usr/lib/python2.7/dist-packages/lazr/restfulclient/_browser.py", line 211, in _request_and_retry
    url, method=method, body=body, headers=headers)
  File "/usr/lib/python2.7/dist-packages/httplib2/__init__.py", line 1099, in request
    (response, new_content) = self._request(conn, authority, uri, request_uri, method, body, headers, redirections, cachekey)
  File "/usr/lib/python2.7/dist-packages/lazr/restfulclient/_browser.py", line 130, in _request
    redirections, cachekey)
  File "/usr/lib/python2.7/dist-packages/httplib2/__init__.py", line 901, in _request
    (response, content) = self._conn_request(conn, request_uri, method, body, headers)
  File "/usr/lib/python2.7/dist-packages/httplib2/__init__.py", line 875, in _conn_request
    conn.connect()
  File "/usr/lib/python2.7/dist-packages/httplib2/__init__.py", line 773, in connect
    sock.connect((self.host, self.port))
  File "/usr/lib/python2.7/socket.py", line 224, in meth
    return getattr(self._sock,name)(*args)
socket.gaierror: [Errno -5] No address associated with hostname
Error in sys.excepthook:
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/apport_python_hook.py", line 57, in apport_excepthook
    binary = os.path.realpath(os.path.join(os.getcwdu(), sys.argv[0]))
OSError: [Errno 2] No such file or directory

Original exception was:
Traceback (most recent call last):
  File "/usr/bin/sponsor-patch", line 120, in <module>
    main()
  File "/usr/bin/sponsor-patch", line 111, in main
    options.upload, workdir, options.verbose)
  File "/usr/lib/python2.7/dist-packages/ubuntutools/sponsor_patch/sponsor_patch.py", line 395, in sponsor_patch
    ubuntu = launchpad.distributions['ubuntu']
  File "/usr/lib/python2.7/dist-packages/lazr/restfulclient/resource.py", line 933, in __getitem__
    shim_resource._ensure_representation()
  File "/usr/lib/python2.7/dist-packages/lazr/restfulclient/resource.py", line 342, in _ensure_representation
    representation = self._root._browser.get(self._wadl_resource)
  File "/usr/lib/python2.7/dist-packages/lazr/restfulclient/_browser.py", line 291, in get
    response, content = self._request(url, extra_headers=headers)
  File "/usr/lib/python2.7/dist-packages/lazr/restfulclient/_browser.py", line 242, in _request
    str(url), method=method, body=data, headers=headers)
  File "/usr/lib/python2.7/dist-packages/lazr/restfulclient/_browser.py", line 211, in _request_and_retry
    url, method=method, body=body, headers=headers)
  File "/usr/lib/python2.7/dist-packages/httplib2/__init__.py", line 1099, in request
    (response, new_content) = self._request(conn, authority, uri, request_uri, method, body, headers, redirections, cachekey)
  File "/usr/lib/python2.7/dist-packages/lazr/restfulclient/_browser.py", line 130, in _request
    redirections, cachekey)
  File "/usr/lib/python2.7/dist-packages/httplib2/__init__.py", line 901, in _request
    (response, content) = self._conn_request(conn, request_uri, method, body, headers)
  File "/usr/lib/python2.7/dist-packages/httplib2/__init__.py", line 875, in _conn_request
    conn.connect()
  File "/usr/lib/python2.7/dist-packages/httplib2/__init__.py", line 773, in connect
    sock.connect((self.host, self.port))
  File "/usr/lib/python2.7/socket.py", line 224, in meth
    return getattr(self._sock,name)(*args)
socket.gaierror: [Errno -5] No address associated with hostname

** Affects: ubuntu-dev-tools (Ubuntu)
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of MOTU,
which is subscribed to ubuntu-dev-tools in ubuntu.
https://bugs.launchpad.net/bugs/709705

Title:
  [sponsor-patch] Ugly error message while computer has been
  disconnected from internet




More information about the universe-bugs mailing list