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

Indents were messed up from the paste

This commit is contained in:
Myned 2017-12-23 21:39:21 -05:00
parent ab6763f578
commit 38329fc8d7

View file

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