Changeset 4155
- Timestamp:
- Sep 19, 2019 9:04:40 PM (4 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/GSASIIctrlGUI.py
r4093 r4155 4718 4718 except ImportError: # no config.py file yet 4719 4719 savefile = os.path.join(GSASIIpath.path2GSAS2,'config.py') 4720 except Exception as err: # import failed 4721 # find the bad file, save it in a new name and prepare to overwrite it 4722 for p in sys.path: 4723 savefile = os.path.join(p,'config.py') 4724 if os.path.exists(savefile): 4725 import distutils.file_util as dfu 4726 keepfile = os.path.join(p,'config.py_corrupt') 4727 print('Current config file contains an error:',savefile) 4728 print('saving that file as',keepfile) 4729 dfu.copy_file(savefile,keepfile) 4730 print('preparing to overwrite...') 4731 break 4732 else: 4733 print('unexpected error importing config.py') 4734 savefile = os.path.join(GSASIIpath.path2GSAS2,'config.py') 4735 4720 4736 # try to open file for write 4721 4737 try: -
trunk/GSASIIpath.py
r4154 r4155 978 978 configDict = {'Clip_on':True} 979 979 except Exception as err: 980 print(60*'*',"\nError reading config.py file") 980 981 if printInfo: 981 print("Error importing config.py file: "+str(err)) 982 import traceback 983 print(traceback.format_exc()) 984 print(60*'*') 982 985 configDict = {'Clip_on':True} 983 986
Note: See TracChangeset
for help on using the changeset viewer.