Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
8e5e3151
Commit
8e5e3151
authored
Feb 22, 2016
by
Andy Whitcroft
Committed by
Tim Gardner
Apr 06, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
UBUNTU: [Debian] git-ubuntu-log -- handle invalid or private bugs
Signed-off-by:
Andy Whitcroft
<
apw@canonical.com
>
parent
5f77b0f4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
12 deletions
+16
-12
debian/scripts/misc/git-ubuntu-log
debian/scripts/misc/git-ubuntu-log
+16
-12
No files found.
debian/scripts/misc/git-ubuntu-log
View file @
8e5e3151
...
...
@@ -64,18 +64,22 @@ for bug in bugs:
else
:
bug_info
=
None
#urllib.request.urlcleanup()
request
=
urllib
.
request
.
Request
(
'https://api.launchpad.net/devel/bugs/'
+
bug
)
request
.
add_header
(
'Cache-Control'
,
'max-age=0'
)
with
urllib
.
request
.
urlopen
(
request
)
as
response
:
data
=
response
.
read
()
bug_info
=
json
.
loads
(
data
.
decode
(
'utf-8'
))
title
=
bug_info
[
'title'
]
if
'description'
in
bug_info
:
for
line
in
bug_info
[
'description'
].
split
(
'
\
n
'
):
if
line
.
startswith
(
'Kernel-Description:'
):
title
=
line
.
split
(
' '
,
1
)[
1
]
try
:
#urllib.request.urlcleanup()
request
=
urllib
.
request
.
Request
(
'https://api.launchpad.net/devel/bugs/'
+
bug
)
request
.
add_header
(
'Cache-Control'
,
'max-age=0'
)
with
urllib
.
request
.
urlopen
(
request
)
as
response
:
data
=
response
.
read
()
bug_info
=
json
.
loads
(
data
.
decode
(
'utf-8'
))
title
=
bug_info
[
'title'
]
if
'description'
in
bug_info
:
for
line
in
bug_info
[
'description'
].
split
(
'
\
n
'
):
if
line
.
startswith
(
'Kernel-Description:'
):
title
=
line
.
split
(
' '
,
1
)[
1
]
except
urllib
.
error
.
HTTPError
:
title
=
'INVALID or PRIVATE BUG'
title
+=
' (LP: #'
+
bug
+
')'
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment