#383: Depcheck and Upgradepath crash if yourls is not configured
----------------------+-----------------------------------------------------
Reporter: tflink | Owner:
Type: defect | Status: new
Priority: critical | Milestone: 0.7.0
Component: core | Keywords:
----------------------+-----------------------------------------------------
If yourls is not configured (empty configuration file), depcheck and
upgrade path crash at the end of the test when URL shortening is
attempted.
There is an example of this in the staging environment:
http://autoqa-
stg.fedoraproject.org/results/4194-autotest/virt24.qa/debug/client.0.DEBUG
{{{
11/11 15:28:23 INFO | test:0358| Log created:
/usr/share/autotest/results/default/depcheck/results/wicd-
kde-0.2.3-3.fc1.html
11/11 15:28:23 ERROR| test:0473|
--------------------------------------------------------------------------------
11/11 15:28:23 ERROR| test:0473| Traceback (most recent call last):
11/11 15:28:23 ERROR| test:0473| File "/usr/lib/python2.7/site-
packages/autoqa/decorators.py", line 72, in newf
11/11 15:28:23 ERROR| test:0473| f_result = f(*args, **kwargs)
#call the decorated function
11/11 15:28:23 ERROR| test:0473| File
"/usr/share/autotest/tests/depcheck/depcheck.py", line 362, in run_once
11/11 15:28:23 ERROR| test:0473| self.post_results(td, bodhi =
{'title': title})
11/11 15:28:23 ERROR| test:0473| File "/usr/lib/python2.7/site-
packages/autoqa/test.py", line 231, in post_results
11/11 15:28:23 ERROR| test:0473| self._send_email(test_detail,
optin=optin, logname=logname)
11/11 15:28:23 ERROR| test:0473| File "/usr/lib/python2.7/site-
packages/autoqa/test.py", line 292, in _send_email
11/11 15:28:23 ERROR| test:0473| logname=logname)
11/11 15:28:23 ERROR| test:0473| File "/usr/lib/python2.7/site-
packages/autoqa/test.py", line 334, in _create_email_body
11/11 15:28:23 ERROR| test:0473| url =
self._shorten_url(self.url['result_dir'] + urllib.quote(logname),
test_detail)
11/11 15:28:23 ERROR| test:0473| File "/usr/lib/python2.7/site-
packages/autoqa/test.py", line 179, in _shorten_url
11/11 15:28:23 ERROR| test:0473| url =
self._yourls_client.shorten(url)
11/11 15:28:23 ERROR| test:0473| File "/usr/lib/python2.7/site-
packages/yourls/client.py", line 104, in shorten
11/11 15:28:23 ERROR| test:0473| raw_data =
json.loads(self._send_request(args))
11/11 15:28:23 ERROR| test:0473| File "/usr/lib/python2.7/site-
packages/yourls/client.py", line 81, in _send_request
11/11 15:28:23 ERROR| test:0473| r = urllib2.urlopen(req)
11/11 15:28:23 ERROR| test:0473| File
"/usr/lib64/python2.7/urllib2.py", line 126, in urlopen
11/11 15:28:23 ERROR| test:0473| return _opener.open(url, data,
timeout)
11/11 15:28:23 ERROR| test:0473| File
"/usr/lib64/python2.7/urllib2.py", line 384, in open
11/11 15:28:23 ERROR| test:0473| protocol = req.get_type()
11/11 15:28:23 ERROR| test:0473| File
"/usr/lib64/python2.7/urllib2.py", line 245, in get_type
11/11 15:28:23 ERROR| test:0473| raise ValueError, "unknown url
type: %s" % self.__original
11/11 15:28:23 ERROR| test:0473| ValueError: unknown url type:
}}}
This may end up being a bug in python-yourls but that's not clear yet.
--
Ticket URL: <
https://fedorahosted.org/autoqa/ticket/383>
AutoQA <
http://autoqa.fedorahosted.org>
Automated QA project