Show
Ignore:
Timestamp:
01/18/08 23:39:41 (16 years ago)
Author:
jerome
Message:

Added modules to store utility functions and application
intialization code, which has nothing to do in classes.
Modified tool.py accordingly (far from being finished)
Use these new modules where necessary.
Now converts all command line arguments to unicode before
beginning to work. Added a proper logging method for already
encoded query strings.

Files:
1 modified

Legend:

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

    r3291 r3294  
    2929from pykota.storage import BaseStorage 
    3030from pykota.storages.sql import SQLStorage 
     31 
     32from pykota.utils import *                            
    3133 
    3234try : 
     
    99101        try : 
    100102            before = time.time() 
    101             self.tool.logdebug("QUERY : %s" % query) 
     103            self.querydebug("QUERY : %s" % query) 
    102104            result = self.database.query(query) 
    103105        except PGError, msg :     
     
    121123        try : 
    122124            before = time.time() 
    123             self.tool.logdebug("QUERY : %s" % query) 
     125            self.querydebug("QUERY : %s" % query) 
    124126            result = self.database.query(query) 
    125127        except PGError, msg :     
     
    154156                    field = fields[j] 
    155157                    if type(field) == StringType : 
    156                         fields[j] = self.databaseToUnicode(field)  
     158                        fields[j] = databaseToUnicode(field)  
    157159                entries[i] = tuple(fields)     
    158160            return entries