Changeset 2285
- Timestamp:
- 06/08/05 08:45:46 (19 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
pykota/trunk/pykota/dumper.py
r2266 r2285 97 97 raise PyKotaToolError, _("XML output is disabled because the jaxml module is not available.") 98 98 99 if options["sum"] and datatype not in ("payments", "history") : 100 raise PyKotaToolError, _("Invalid datatype [%s] for --sum command line option, see help.") % datatype 101 99 102 entries = getattr(self.storage, "extract%s" % datatype.title())(extractonly) 100 103 if entries : … … 106 109 mustclose = 1 107 110 108 retcode = getattr(self, "dump%s" % format.title())( entries, datatype)111 retcode = getattr(self, "dump%s" % format.title())(self.summarizeDatas(entries, datatype, options["sum"]), datatype) 109 112 110 113 if mustclose : … … 114 117 return 0 115 118 119 def summarizeDatas(self, entries, datatype, sum=0) : 120 """Transforms the datas into a summarized view (with totals). 121 122 If sum is false, returns the entries unchanged. 123 """ 124 if not sum : 125 return entries 126 else : 127 # TODO : really transform the datas. 128 sys.stderr.write("WARNING : --sum command line option is not implemented yet !\n") 129 return entries 130 116 131 def dumpWithSeparator(self, separator, entries) : 117 132 """Dumps datas with a separator."""