[SRU intrepid] python-uniconvertor exits interpreter on import

Bug #300141 reported by Matt Beaumont-Gay on 2008-11-20
Affects Status Importance Assigned to Milestone
python-uniconvertor (Ubuntu)
Andreas Wenning
Nominated for Intrepid by Andreas Wenning

Bug Description

Original bug description:
uniconvertor's __init__.py unconditionally tests sys.argv, and if it is found lacking (wrong number of args, etc.), the script calls sys.exit. This wouldn't be much of a problem except that when you run 'help("modules")' in the Python interpreter, it tries to import every module it can find, and when it imports uniconvertor, the interpreter suddenly quits. (Tangentially, this also breaks zsh's tab-completion script for arguments to 'python -m'.)

Installation of this package breaks certain python features, like help("modules") and has an impact on tab completion as well.

Other fixes:
The bug is fixed in version 1.1.3-4 in jaunty. This minimal patch attached here is pending in testing-proposed-updates in debian.

Start python and run help("modules") or import uniconvertor. Before installing the proposed version the python interpreter exits unexpectedly. After installing the proposed version the commands works as they respectively should.

Regression potential:
The package has one and only one usage; running it from command-line with two arguments input-file and output-file. As this usecase can be verified as still working fully, there is no regression potential in this patch.


Thanks for noticing this issue. Please test the proposed fix made for intrepid in python-uniconvertor 1.1.2-1ubuntu0.1~ppa1 available from my PPA: https://launchpad.net/~andreas-wenning/+archive

Changed in python-uniconvertor:
assignee: nobody → andreas-wenning
status: New → In Progress

That should have been python-uniconvertor 1.1.2-1ubuntu0.1~ppa2

Seems my initial idea didn't do well in all cases. Seems I need to work some more on this.

Please give python-uniconvertor 1.1.2-1ubuntu0.1~ppa8 a test to see if that doesn't seem to do correctly?

Matt Beaumont-Gay (mattb-cs) wrote :

Hi Andreas,

That works great, thanks.

Perfect. I'm getting the fix into the package in debian and it will hopefully get auto-synced to jaunty within the next few days.

Launchpad Janitor (janitor) wrote :

This bug was fixed in the package python-uniconvertor - 1.1.3-4

python-uniconvertor (1.1.3-4) unstable; urgency=low

  * Add 04_no_exit_on_import.dpatch to prevent uniconvertor from calling
    sys.exit() on import exiting the python interpreter. (LP: #300141)

 -- Ubuntu Archive Auto-Sync <email address hidden> Sat, 22 Nov 2008 23:55:07 +0000

Changed in python-uniconvertor:
status: In Progress → Fix Released

SRU debdiff

description: updated
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers