8bitworkshop/tools/checkpresets.py

17 lines
396 B
Python
Raw Normal View History

import os,sys,codecs
for root, dirs, files in os.walk("./presets"):
for fn in files:
path = root + '/' + fn
if fn[-1] == '~':
continue
try:
with open(path,'r') as f:
data = f.read()
if data[0] != '\n':
2018-11-22 19:11:56 +00:00
print((path,'no initial newline'))
except:
2018-11-22 19:11:56 +00:00
print((path,sys.exc_info()[0]))