showwarning hook wrong in /usr/lib/pymodules/python2.6/pyfits/NP_pyfits.py

Bug #553496 reported by Oliver Cordes
This bug report is a duplicate of:  Bug #432459: "clobber" fails when writing files. Edit Remove
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
pyfits (Ubuntu)
New
Undecided
Unassigned

Bug Description

python-pyfits

in file: /usr/lib/pymodules/python2.6/pyfits/NP_pyfits.py

line 70:
----

_showwarning = warnings.showwarning

def showwarning(message, category, filename, lineno, file=None):
    if file is None:
        file = sys.stdout
    _showwarning(message, category, filename, lineno, file)

def formatwarning(message, category, filename, lineno):
    return str(message)+'\n'
---

has to changed into:

_showwarning = warnings.showwarning

def showwarning(message, category, filename, lineno, file=None, line=None):
    if file is None:
        file = sys.stdout
    _showwarning(message, category, filename, lineno, file, line)

def formatwarning(message, category, filename, lineno, line):
    return str(message)+'\n'

----

to follow descriptions of the module warnings !!

lsb_release -rd
Description: Ubuntu lucid (development branch)
Release: 10.04

apt-cache policy python-pyfits
python-pyfits:
  Installiert: 1:1.3-3
  Kandidat: 1:1.3-3
  Versions-Tabelle:
 *** 1:1.3-3 0
        500 http://de.archive.ubuntu.com/ubuntu/ lucid/universe Packages
        100 /var/lib/dpkg/status

Urgent and more or less release critical because package is unusable ...

Cheers,
    Oliver Cordes

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.