Changeset 926ece5 in sasview for src/sas/sascalc/dataloader


Ignore:
Timestamp:
Sep 18, 2018 9:36:59 AM (6 years ago)
Author:
krzywon
Branches:
master, magnetic_scatt, release-4.2.2, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, unittest-saveload
Children:
5218180
Parents:
f4e2f22
Message:

Py3 compatibility and code cleanup.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/sas/sascalc/dataloader/readers/cansas_reader_HDF5.py

    rfeec1cb r926ece5  
    601601            iter(iterable) 
    602602            if (not isinstance(iterable, np.ndarray) and not isinstance( 
    603                     iterable, list)) or (isinstance(iterable, str) or 
    604                                          isinstance(iterable, unicode)): 
     603                    iterable, list)) or (isinstance(iterable, basestring)): 
    605604                raise TypeError 
    606605        except TypeError: 
     
    633632                elif q_vals.attrs.get("uncertainty") is not None: 
    634633                    self.q_uncertainties = q_vals.attrs.get("uncertainty") 
    635                 if isinstance(self.q_uncertainties, str): 
     634                if isinstance(self.q_uncertainties, basestring): 
    636635                    self.q_uncertainties = self.q_uncertainties.split(",") 
    637636                if q_vals.attrs.get("resolutions") is not None: 
    638637                    self.q_resolutions = q_vals.attrs.get("resolutions") 
    639                 if isinstance(self.q_resolutions, (str, unicode)): 
     638                if isinstance(self.q_resolutions, basestring): 
    640639                    self.q_resolutions = self.q_resolutions.split(",") 
    641640        if self.i_name in keys: 
Note: See TracChangeset for help on using the changeset viewer.