error_count = error_count + 1
if opts.verbose:
print("Failed nsupdate: %d" % ret)
- except Exception, estr:
+ except Exception as estr:
if opts.fail_immediately:
sys.exit(1)
error_count = error_count + 1
error_count = error_count + 1
if opts.verbose:
print("Failed 'samba-tool dns' based update of %s" % (str(d)))
- except Exception, estr:
+ except Exception as estr:
if opts.fail_immediately:
sys.exit(1)
error_count = error_count + 1
if ret_names.names[0].status != 0:
print("Failed to set DNS entry: %s (status %u)" % (d, ret_names.names[0].status))
error_count = error_count + 1
- except RuntimeError, reason:
+ except RuntimeError as reason:
print("Error setting DNS entry of type %u: %s: %s" % (t, d, reason))
error_count = error_count + 1