Changeset 4266


Ignore:
Timestamp:
Jan 25, 2020 5:36:56 PM (21 months ago)
Author:
toby
Message:

add patches for Python 2.7

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIpwd.py

    r4265 r4266  
    35553555            reflDict[hash('%5d%5d%5d'%(ref[0],ref[1],ref[2]))] = iref
    35563556    fbaName = os.path.splitext(prfName)[0]+'.fba'
     3557    try: # patch for FileNotFoundError not in Python 2.7
     3558        FileNotFoundError
     3559    except NameError:
     3560        FileNotFoundError = Exception
    35573561    try:
    35583562        fba = open(fbaName,'r')
  • trunk/makeBat.py

    r4235 r4266  
    9595    new = False
    9696    oldBat = ''
     97    try: # patch for FileNotFoundError not in Python 2.7
     98        FileNotFoundError
     99    except NameError:
     100        FileNotFoundError = Exception
    97101    # this code does not appear to work properly when paths have spaces
    98102    try:
Note: See TracChangeset for help on using the changeset viewer.