Changeset 2033

Show
Ignore:
Timestamp:
01/19/05 09:56:30 (20 years ago)
Author:
jalet
Message:

Convert PygreSQL's new exception into a string before re-raising it

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • pykota/trunk/pykota/storages/pgstorage.py

    r2031 r2033  
    2222# 
    2323# $Log$ 
     24# Revision 1.39  2005/01/19 08:56:30  jalet 
     25# Convert PygreSQL's new exception into a string before re-raising it 
     26# 
    2427# Revision 1.38  2005/01/19 08:48:17  jalet 
    2528# Fix exception's name wrt newer versions of PygreSQL 
     
    181184            self.database = pg.connect(host=host, port=port, dbname=dbname, user=user, passwd=passwd) 
    182185        except PGError, msg : 
    183             raise PyKotaStorageError, msg 
     186            raise PyKotaStorageError, str(msg) 
    184187        else :     
    185188            self.closed = 0 
     
    217220            result = self.database.query(query) 
    218221        except PGError, msg :     
    219             raise PyKotaStorageError, msg 
     222            raise PyKotaStorageError, str(msg) 
    220223        else :     
    221224            return result 
     
    236239            result = self.database.query(query) 
    237240        except PGError, msg :     
    238             raise PyKotaStorageError, msg 
     241            raise PyKotaStorageError, str(msg) 
    239242        else :     
    240243            return result