Ignore:
Timestamp:
Apr 30, 2012 10:57:52 AM (10 years ago)
Author:
toby
Message:

finish import structure factor; refactor import classes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/G2importphase_CIF.py

    r547 r580  
    2424            )
    2525    def ContentsValidator(self, filepointer):
    26         filepointer.seek(0) # rewind the file pointer
    2726        for i,line in enumerate(filepointer):
    2827            if i >= 1000: break
     
    7473            ciffile = 'file:'+urllib.pathname2url(filename)
    7574            cf = cif.ReadCif(ciffile)
     75            self.DoneBusy()
    7676            #print cf
    7777            # scan blocks for structural info
     
    9494                    choice[-1] += blknm + ': '
    9595                    for i in phasenamefields: # get a name for the phase
    96                         name = cf[blknm].get(i).strip()
     96                        name = cf[blknm].get(i)
    9797                        if name is None or name == '?' or name == '.':
    9898                            continue
     
    208208            print traceback.format_exc()
    209209            returnstat = False
    210         finally:
    211             self.DoneBusy()
    212210        return returnstat
Note: See TracChangeset for help on using the changeset viewer.