login_with() crashes if there's no web browser installed
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Kubuntu Automation |
New
|
Undecided
|
Unassigned | ||
python-launchpadlib (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
Hi,
I have a program which uses launchpadlib's login_with, and it's crashing like this in a system without any browser installed:
$ kubuntu-
Logs are activated and are going to be stored in:
/home/santa/
If you want to disable this feature, edit your ~/kubuntu-
Date started: Sat, 22 Apr 2017 22:36:33 +0200
The authorization page:
(https:/
should be opening in your browser. Use your browser to authorize
this program to access Launchpad on your behalf.
Waiting to hear from Launchpad about your decision...
Traceback (most recent call last):
File "/usr/bin/
lp = Launchpad.
File "/usr/lib/
credential_
File "/usr/lib/
credentials = authorization_
File "/usr/lib/
self.
File "/usr/lib/
if browser_obj is not None:
UnboundLocalError: local variable 'browser_obj' referenced before assignment
replacing this code
if browser_obj is not None:
with this
if browser is not None:
fixes the problem for me
This bug was fixed in the package python-launchpadlib - 1.10.5-1
---------------
python-launchpadlib (1.10.5-1) unstable; urgency=medium
* Team upload. r.Error (LP: #1685549).
* New upstream release:
- Fix fallback if authorizing a token with a browser raises
webbrowse
-- Colin Watson <email address hidden> Tue, 05 Sep 2017 12:36:21 +0100