1
0
Fork 0
mirror of https://github.com/myned/modufur.git synced 2024-12-24 14:27:27 +00:00

Indent mistake

This commit is contained in:
Myned 2017-12-23 21:37:21 -05:00
parent 05dd3a4fa2
commit ab6763f578

View file

@ -39,17 +39,17 @@ except FileNotFoundError:
def setdefault(filename, default=None, json=False):
if json:
try:
with open(filename, 'rb') as infile:
print(f'LOADED : {filename}')
return jsn.load(infile)
try:
with open(filename, 'rb') as infile:
print(f'LOADED : {filename}')
return jsn.load(infile)
except FileNotFoundError:
with open(filename, 'wb+') as iofile:
print(f'FILE NOT FOUND : {filename} created and loaded with default values')
jsn.dump(default, iofile)
iofile.seek(0)
return jsn.load(iofile)
except FileNotFoundError:
with open(filename, 'wb+') as iofile:
print(f'FILE NOT FOUND : {filename} created and loaded with default values')
jsn.dump(default, iofile)
iofile.seek(0)
return jsn.load(iofile)
else:
try:
with open(filename, 'rb') as infile: