[SRU intrepid] python-uniconvertor exits interpreter on import

Bug #300141 reported by Matt Beaumont-Gay
4
Affects Status Importance Assigned to Milestone
python-uniconvertor (Ubuntu)
Fix Released
Undecided
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'.)

Rationale:
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.

TEST CASE:
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.

Revision history for this message
Andreas Wenning (andreas-wenning) wrote :

Hi

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
Revision history for this message
Andreas Wenning (andreas-wenning) wrote :

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

Revision history for this message
Andreas Wenning (andreas-wenning) wrote :

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

Revision history for this message
Andreas Wenning (andreas-wenning) wrote :

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

Revision history for this message
Matt Beaumont-Gay (mattb-cs) wrote :

Hi Andreas,

That works great, thanks.

Revision history for this message
Andreas Wenning (andreas-wenning) wrote :

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.

Revision history for this message
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
Revision history for this message
Andreas Wenning (andreas-wenning) wrote :

SRU debdiff

description: updated
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.