| 104 | |
| 105 | |
| 106 | QString PythonRoutines::SetNewMetadataInPython(const MetadataPieces& mdp, const QString& opfdata, const QString& version) |
| 107 | { |
| 108 | int rv = 0; |
| 109 | QString traceback; |
| 110 | QString newopfdata= opfdata; |
| 111 | QString module = "metaproc2"; |
| 112 | if (version.startsWith('3')) module = "metaproc3"; |
| 113 | QList<QVariant> args; |
| 114 | args.append(QVariant(mdp.data)); |
| 115 | args.append(QVariant(mdp.otherxml)); |
| 116 | args.append(QVariant(mdp.idlist)); |
| 117 | args.append(QVariant(mdp.metatag)); |
| 118 | args.append(QVariant(opfdata)); |
| 119 | EmbeddedPython* epp = EmbeddedPython::instance(); |
| 120 | QVariant res = epp->runInPython(module, QString("set_new_metadata"), args, &rv, traceback, true); |
| 121 | if (rv) { |
| 122 | fprintf(stderr, "set_new_metadata error %d traceback %s\n",rv, traceback.toStdString().c_str()); |
| 123 | return newopfdata; |
| 124 | } |
| 125 | newopfdata = res.toString(); |
| 126 | return newopfdata; |
| 127 | } |
| 128 | |
| 129 | |
| 130 | QString PythonRoutines::PerformRepoCommitInPython(const QString &localRepo, |
no test coverage detected