mirror of
https://git.launchpad.net/~ubuntu-release/britney/+git/britney2-ubuntu
synced 2025-05-23 00:11:32 +00:00
boottest - Add exception message to warning print and fix typo
This commit is contained in:
parent
87ccbfd731
commit
f0a55936f5
@ -82,8 +82,8 @@ class TouchManifest(object):
|
|||||||
try:
|
try:
|
||||||
response = urllib.urlopen(url)
|
response = urllib.urlopen(url)
|
||||||
except IOError as e:
|
except IOError as e:
|
||||||
print("W: [%s] - error connecting to %s" % (
|
print("W: [%s] - error connecting to %s: %s" % (
|
||||||
time.asctime(), self.path))
|
time.asctime(), self.path, e))
|
||||||
return success # failure
|
return success # failure
|
||||||
|
|
||||||
# Only [re]create the manifest file if one was successfully downloaded
|
# Only [re]create the manifest file if one was successfully downloaded
|
||||||
|
@ -89,7 +89,7 @@ class TestTouchManifest(unittest.TestCase):
|
|||||||
self.assertEqual(1, len(manifest._manifest))
|
self.assertEqual(1, len(manifest._manifest))
|
||||||
self.assertIn('foo', manifest)
|
self.assertIn('foo', manifest)
|
||||||
|
|
||||||
def test_fetch_excpetion(self):
|
def test_fetch_exception(self):
|
||||||
_p = mock.patch('urllib.urlopen')
|
_p = mock.patch('urllib.urlopen')
|
||||||
mocked_urlopen = _p.start()
|
mocked_urlopen = _p.start()
|
||||||
self.addCleanup(_p.stop)
|
self.addCleanup(_p.stop)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user