osc breaks if no keyring is available

Bug #995263 reported by Frank Lichtenheld
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
osc (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

The first call of osc that writes the config file actually works, but on subsequent calls it immeditially crashes:
Traceback (most recent call last):
  File "/usr/bin/osc", line 21, in <module>
    r = babysitter.run(osccli)
  File "/usr/lib/python2.7/dist-packages/osc/babysitter.py", line 52, in run
    return prg.main()
  File "/usr/lib/python2.7/dist-packages/osc/cmdln.py", line 302, in main
    self.postoptparse()
  File "/usr/lib/python2.7/dist-packages/osc/commandline.py", line 118, in postoptparse
    override_verbose = self.options.verbose)
  File "/usr/lib/python2.7/dist-packages/osc/conf.py", line 857, in get_config
    'pass': password,
UnboundLocalError: local variable 'password' referenced before assignment

System info:
Description: Ubuntu 12.04 LTS
Release: 12.04

Package info:
osc:
  Installiert: 0.132.6-1
  Kandidat: 0.132.6-1
  Versionstabelle:
 *** 0.132.6-1 0
        500 http://de.archive.ubuntu.com/ubuntu/ precise/universe i386 Packages
        100 /var/lib/dpkg/status

Related branches

Revision history for this message
Frank Lichtenheld (djpig) wrote :

I found out that this is related to keyring support. When I disable keyring usage in the config file or with --no-keyring, osc works as expected.

Note that I call osc in a ssh session where no keyring is available. So it might be that the detection of available keyrings is what is broken.

summary: - osc doesn't work at all if it has a config file
+ osc breaks if no keyring is available
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in osc (Ubuntu):
status: New → Confirmed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package osc - 0.139.2-1

---------------
osc (0.139.2-1) unstable; urgency=low

  [ Jakub Wilk ]
  * Use canonical URIs for Vcs-* fields.

  [ Michal Čihař ]
  * New upstream release.
  * Recommend python-keyring (should be now optional) (Closes: #688909,
    LP: #995263).
  * Depends on ca-certificates (Closes: #703982).
  * Fixed watch file.

 -- Michal Čihař <email address hidden> Tue, 07 May 2013 09:35:51 +0200

Changed in osc (Ubuntu):
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.