Ignore:
Timestamp:
Oct 15, 2010 2:43:00 AM (11 years ago)
Author:
khunter
Message:

Drive-by mild clean-up of an init function while I researching
another issue.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • coopr.pysp/trunk/coopr/pysp/scenariotree.py

    r3105 r3106  
    362362
    363363      self._name = None # some arbitrary identifier
    364       self._reference_instance = None # the reference (deterministic) base model
     364      self._reference_instance = kwds.pop( 'scenarioinstance', None ) # the reference (deterministic) base model
    365365
    366366      # the core objects defining the scenario tree.
     
    378378      self._scenario_based_data = None
    379379
    380       scenario_tree_instance = None
    381       scenario_bundle_list = None
     380      scenario_tree_instance = kwds.pop( 'scenariotreeinstance', None )
     381      scenario_bundle_list = kwds.pop( 'scenariobundlelist', None )
    382382
    383383      # process the keyword options
    384384      for key in kwds.keys():
    385          if key == "scenarioinstance":
    386             self._reference_instance = kwds[key]
    387          elif key == "scenariotreeinstance":
    388             scenario_tree_instance = kwds[key]
    389          elif key == "scenariobundlelist":
    390             scenario_bundle_list = kwds[key]
    391          else:
    392             print "Unknown option=" + key + " specified in call to ScenarioTree constructor"
     385         print >>sys.stderr, "Unknown option '%s' specified in call to ScenarioTree constructor" % key
    393386
    394387      if self._reference_instance is None:
Note: See TracChangeset for help on using the changeset viewer.