X-Git-Url: http://git.onelab.eu/?p=sfa.git;a=blobdiff_plain;f=clientbin%2FsetRecord.py;h=493400c3ba6cf0ec1d77ff39636ee7ed36afae5e;hp=742cf95d72e743755f18179144a30ccc6b9d37b3;hb=4a9e6751f9f396f463932133b9d62fc925a99ef6;hpb=648ac3fd865ea29425485f26eb0a7bf1a62281e0 diff --git a/clientbin/setRecord.py b/clientbin/setRecord.py index 742cf95d..493400c3 100755 --- a/clientbin/setRecord.py +++ b/clientbin/setRecord.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python2 +#!/usr/bin/env python3 """ Updates record objects @@ -58,7 +58,7 @@ def replaceDict(newval, recordDict, options): Replaces field in dict """ # Check type of old field matches type of new field - for (key, val) in newval.iteritems(): + for (key, val) in newval.items(): recordDict[key] = val @@ -66,7 +66,7 @@ def modDict(newval, recordDict, options): """ Checks type of existing field, addends new field """ - for (key, val) in newval.iteritems(): + for (key, val) in newval.items(): if (type(recordDict[key]) == list): if (type(val) == list): recordDict[key] = recordDict[key] + val @@ -98,7 +98,7 @@ def main(): if args: editDict(args, record_dict, options) if options.DEBUG: - print "New Record:\n%s" % record_dict + print("New Record:\n%s" % record_dict) record.parse_dict(record_dict) s = record.toxml() @@ -108,4 +108,4 @@ if __name__ == '__main__': try: main() except Exception as e: - print e + print(e)