[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#143159: marked as done (python-pygresql: pygresql raises the wrong exception type)



Your message dated Fri, 05 Jan 2024 12:13:45 +0000
with message-id <3493fb7b-6954-46a2-b6df-74a8ee287b32@dalerichards.net>
and subject line Re: python-pygresql: pygresql raises the wrong exception type
has caused the Debian Bug report #143159,
regarding python-pygresql: pygresql raises the wrong exception type
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
143159: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=143159
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: python-pygresql
Version: 7.2.1-2
Severity: normal

I have just discovered that pygresql raises the wrong exception type
in some circumstances.  All exceptions are supposed to be a subclass
of pgdb.Error.  If postmaster is not running on the host, this example
shows that pygresql raises an exception whose type is  '_pg.error'  (a
string).

~~~~
#!/usr/bin/python2.1

import sys
import pgdb 

try :
    conn = pgdb.connect( host="localhost" )
except pgdb.Error :
    print "Correct"
except :
    print "Wrong!"
    print type( sys.exc_info()[0] )
    sys.stdout.write( sys.exc_info()[1] )
~~~~


~~~~
Wrong!
<type 'string'>
could not connect to server: Connection refused
    Is the server running on host localhost and accepting
    TCP/IP connections on port 5432?
~~~~


-D


-- System Information
Debian Release: 3.0
Architecture: i386
Kernel: Linux dman 2.4.18-custom.3 #1 Mon Apr 15 09:54:59 CDT 2002 i686
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8

Versions of packages python-pygresql depends on:
ii  libc6                         2.2.5-4    GNU C Library: Shared libraries an
ii  libpgsql2                     7.2.1-2    Shared library libpq.so.2 for Post
ii  python                        2.1.2-3    An interactive object-oriented scr
ii  python2.1-egenix-mxdatetime   2.0.3-3    Date and time handling routines fo



--- End Message ---
--- Begin Message ---
Version: 1:6.0-1

This can no longer be reproduced in the new version 1:6.0-1. I suspect this bug only affected the old python2 module, which is no longer included or supported.

Please feel free to re-open if you can still reproduce this bug.

Best regards,
Dale Richards

--- End Message ---

Reply to: