-#!/usr/bin/python
+#!/usr/bin/env python3
"""
Updates record objects
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
"""
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
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()
try:
main()
except Exception as e:
- print e
+ print(e)