diff --git a/ModuleFixTarget.py b/ModuleFixTarget.py index edb9b49..b3f625f 100644 --- a/ModuleFixTarget.py +++ b/ModuleFixTarget.py @@ -375,9 +375,9 @@ class WndFixTarget(QWidget): #df.to_csv(filename, float_format="%.6f") #import numpy as np base,ext=os.path.splitext(filename) - if not ext.lower(): - ext='json' - filename=base+'.'+ext + if ext=='': + ext='.json' + filename=base+ext try: wnd=app._mainWnd except AttributeError: @@ -387,7 +387,7 @@ class WndFixTarget(QWidget): grp=wnd._goTracked data=grp.childItems() - if ext.lower()=='json': + if ext.lower()=='.json': with open(filename, 'w') as f: json.dump(data, f,cls=MyJsonEncoder, indent=2)#separators=(',', ':') else: