Ignore:
Timestamp:
Jun 23, 2016 9:25:06 PM (6 years ago)
Author:
toby
Message:

improve powder imports: suppress printing of binary data; improve validation of old GSAS binary files

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/imports/G2pwd_BrukerRAW.py

    r2238 r2341  
    4444            self.formatName = 'Bruker RAW ver. 3'
    4545        else:
    46             self.errors = 'Unexpected information in header: '+str(head)
    47             self.errors += '  '+str(head)
     46            self.errors = 'Unexpected information in header: '
     47            if all([ord(c) < 128 and ord(c) != 0 for c in str(head)]): # show only if ASCII
     48                self.errors += '  '+str(head)
     49            else:
     50                self.errors += '  (binary)'
    4851            return False
    4952        return True
Note: See TracChangeset for help on using the changeset viewer.