Commit 8e5e3151 authored by Andy Whitcroft's avatar Andy Whitcroft Committed by Tim Gardner

UBUNTU: [Debian] git-ubuntu-log -- handle invalid or private bugs

Signed-off-by: default avatarAndy Whitcroft <apw@canonical.com>
parent 5f77b0f4
...@@ -64,6 +64,7 @@ for bug in bugs: ...@@ -64,6 +64,7 @@ for bug in bugs:
else: else:
bug_info = None bug_info = None
try:
#urllib.request.urlcleanup() #urllib.request.urlcleanup()
request = urllib.request.Request('https://api.launchpad.net/devel/bugs/' + bug) request = urllib.request.Request('https://api.launchpad.net/devel/bugs/' + bug)
request.add_header('Cache-Control', 'max-age=0') request.add_header('Cache-Control', 'max-age=0')
...@@ -77,6 +78,9 @@ for bug in bugs: ...@@ -77,6 +78,9 @@ for bug in bugs:
if line.startswith('Kernel-Description:'): if line.startswith('Kernel-Description:'):
title = line.split(' ', 1)[1] title = line.split(' ', 1)[1]
except urllib.error.HTTPError:
title = 'INVALID or PRIVATE BUG'
title += ' (LP: #' + bug + ')' title += ' (LP: #' + bug + ')'
emit_title = True emit_title = True
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment