Changeset 482


Ignore:
Timestamp:
17/11/15 09:19:50 (4 years ago)
Author:
mjuckes
Message:

Trace put in for missing dict

Location:
CMIP6dreq/trunk/dreqPy
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • CMIP6dreq/trunk/dreqPy/dreq.py

    r471 r482  
    1010from __init__ import DOC_DIR 
    1111 
     12class caughtError(Exception): 
     13     def __init__(self, value): 
     14         self.value = value 
     15     def __str__(self): 
     16         return repr(self.value) 
    1217 
    1318blockSchemaFile = '%s/%s' % (DOC_DIR, 'BlockSchema.csv' ) 
     
    325330    for v in vl: 
    326331      t = self.parsevcfg(v) 
     332      if not hasattr( t.header, '__dict__' ): 
     333        print ('FATAL ERROR: no __dict__ attribute in header: parsing %s [%s]' % (v, vl.index(v))  ) 
     334        print (type(t.header).__name__ ) 
     335        print ( string.join( dir( t.header ) ) ) 
     336        raise caughtError( 'FATAL ERROR: no __dict__ attribute in header' ) 
    327337      tables[t[0].label] = t 
    328338      self.tableClasses[t[0].label] = self.itemClassFact( t, ns=self.ns ) 
  • CMIP6dreq/trunk/dreqPy/dreqCmdl.py

    r435 r482  
    11""" 
    2 Entry point for command line usage -- see ccinit for usage information. 
     2Entry point for command line usage 
    33""" 
    44 
Note: See TracChangeset for help on using the changeset viewer.