(item, params, action)
| 14 | return result |
| 15 | |
| 16 | def _addDataProcessing(item, params, action): |
| 17 | dp = item.getDataProcessing() |
| 18 | p = pms.DataProcessing() |
| 19 | p.setProcessingActions(set([action])) |
| 20 | sw = p.getSoftware() |
| 21 | sw.setName(os.path.basename(sys.argv[0])) |
| 22 | sw.setVersion(pms.VersionInfo.getVersion()) |
| 23 | p.setSoftware(sw) |
| 24 | p.setCompletionTime(pms.DateTime.now()) # TODO: check if this is the reason for the many data processing entries |
| 25 | |
| 26 | for k, v in params.asDict().items(): |
| 27 | p.setMetaValue(b"parameter: "+k, v) |
| 28 | |
| 29 | dp.append(p) |
| 30 | item.setDataProcessing(dp) |
| 31 | return item |
| 32 | |
| 33 | def writeParamsIfRequested(args, params): |
| 34 | if args.write_dict_ini or args.write_ini: |
no test coverage detected