Show
Ignore:
Timestamp:
02/08/07 21:13:03 (17 years ago)
Author:
jerome
Message:

Make start= and end= filters also work with payments. For an unknown
reason it didn't already work (not implemented !)...
Ensures that these filters are only allowed for payments and
history, otherwise an SQL syntax error could have occured.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • pykota/trunk/pykota/dumper.py

    r3133 r3142  
    108108            raise PyKotaToolError, _("XML output is disabled because the jaxml module is not available.") 
    109109             
    110         if options["sum"] and datatype not in ("payments", "history") :  
    111             raise PyKotaCommandLineError, _("Invalid data type [%s] for --sum command line option, see help.") % datatype 
    112              
     110        if datatype not in ("payments", "history") :  
     111            if options["sum"] :  
     112                raise PyKotaCommandLineError, _("Invalid data type [%s] for --sum command line option, see help.") % datatype 
     113            if extractonly.has_key("start") or extractonly.has_key("end") :     
     114                self.printInfo(_("Invalid filter for the %(datatype)s data type.") % locals(), "warn") 
     115                try : 
     116                    del extractonly["start"] 
     117                except KeyError :     
     118                    pass 
     119                try : 
     120                    del extractonly["end"] 
     121                except KeyError :     
     122                    pass 
    113123             
    114124        retcode = 0