Changeset 1085


Ignore:
Timestamp:
07.01.2016 22:59:30 (4 years ago)
Author:
klaus
Message:

debug output, searching for deepcopy bug when window open

File:
1 edited

Legend:

Unmodified
Added
Removed
  • SHX/trunk/SeismicHandler/patches/obspy_.py

    r1080 r1085  
    476476    """ 
    477477     
     478    dbg_a = ['CacheTraceID', '_MutableMapping__marker', '__abstractmethods__', '__class__', '__contains__', '__deepcopy__', '__delattr__', '__delitem__', '__dict__', '__doc__', '__eq__', '__format__', '__getattr__', '__getattribute__', '__getitem__', '__getstate__', '__hash__', '__init__', '__iter__', '__len__', '__metaclass__', '__module__', '__ne__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__setitem__', '__setstate__', '__sizeof__', '__str__', '__subclasshook__', '__weakref__', '_abc_cache', '_abc_negative_cache', '_abc_negative_cache_version', '_abc_registry', '_established', '_parent', '_pretty_str', 'clear', 'copy', 'defaults', 'get', 'items', 'iteritems', 'iterkeys', 'itervalues', 'keys', 'original', 'pop', 'popitem', 'readonly', 'setdefault', 'update', 'values'] 
     479    dbg_b = dir(self.shx) 
     480    print "dbg: setdiff", set(dbg_b)-set(dbg_a) 
     481     
    478482    # exclude parent from deepcopy 
    479483    parentstore = self.shx._parent 
     
    484488    else: 
    485489        originalstore = None 
     490    graphstore = {} 
     491    nocopynames = ['PlotPixels', 'PlotData', 'ImageData'] 
     492    for ncname in nocopynames: 
     493        if ncname in self.shx.keys(): 
     494            graphstore[ncname] = getattr( self.shx, 'PlotData' ) 
     495            setattr( self.shx, 'PlotData', None ) 
     496    #print "dbg: self.shx", dir(self.shx) 
    486497    new = self._obspy_copy() 
    487498    self.shx._parent = parentstore 
     499    new.shx._parent = parentstore 
    488500    if originalstore != None: 
    489501        self.shx.original = originalstore 
    490502        # new.shx.original = None 
    491     new.shx._parent = parentstore 
     503    for k in graphstore.keys(): 
     504        setattr( self.shx, k, graphstore[k] ) 
     505        setattr( new.shx, k, graphstore[k] ) 
    492506    new.stats.sh.UNIQUE_ID = uuid.uuid4().hex 
    493507    #new.shx._established = False 
Note: See TracChangeset for help on using the changeset viewer.