assert verify is not None
filename = "{}out".format(zone)
- with open(filename, 'w') as file:
+ with open(filename, 'w', encoding='utf-8') as file:
for rr in transfer.answer:
file.write(rr.to_text())
file.write('\n')
print("read state file {}".format(filename))
try:
- with open(filename, 'r') as file:
+ with open(filename, 'r', encoding='utf-8') as file:
for line in file:
if line.startswith(';'):
continue
print("read log file {}".format(filename))
try:
- with open(filename, 'r') as file:
+ with open(filename, 'r', encoding='utf-8') as file:
s = mmap.mmap(file.fileno(), 0, access=mmap.ACCESS_READ)
if s.find(bytes(log, "ascii")) != -1:
found = True
print("No python yaml module, skipping")
sys.exit(1)
-with open(sys.argv[1], "r") as f:
+with open(sys.argv[1], "r", encoding="utf-8") as f:
for item in yaml.safe_load_all(f):
for key in sys.argv[2:]:
try: