Changeset 9460


Ignore:
Timestamp:
Nov 30, 2014 10:57:00 PM (4 years ago)
Author:
wehart
Message:

Renaming TaskPlugin? to PyomoTaskPlugin? to
ensure that it's distinguished from the pyutilib task plugin.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pyomo/trunk/pyomo/util/_task.py

    r9247 r9460  
    9999
    100100
    101 class TaskPlugin(plugin.Plugin, pyutilib.workflow.Task):
     101class PyomoTaskPlugin(plugin.Plugin, pyutilib.workflow.Task):
    102102
    103103    def __init__(self, *args, **kwds):      #pragma:nocover
     
    105105        pyutilib.workflow.Task.__init__(self, *args, **kwds)
    106106
    107     def __repr__(self):
     107    def __repr__(self, simple=False):
    108108        return pyutilib.workflow.Task.__repr__(self)     #pragma:nocover
    109109
    110110
    111 class PyomoTask(TaskPlugin):
     111class PyomoTask(PyomoTaskPlugin):
    112112
    113113    def __init__(self, *args, **kwargs):
    114114        self._fn = kwargs.pop('fn', None)
    115115        #
    116         TaskPlugin.__init__(self, *args, **kwargs)
     116        PyomoTaskPlugin.__init__(self, *args, **kwargs)
    117117
    118118    def execute(self, debug=False):
     
    185185                raise RuntimeError("A PyomoTask instance must be executed with at 'data' argument")
    186186        self._kwds = kwds
    187         return TaskPlugin._call_init(self, **kwds)
     187        return PyomoTaskPlugin._call_init(self, **kwds)
    188188
    189189    def _call_fini(self, *options, **kwds):
     
    192192                raise RuntimeError("Cannot return value '%s' that is not a predefined output of a Pyomo task" % key)
    193193            setattr(self, key, self._retval[key])
    194         TaskPlugin._call_fini(self, *options, **kwds)
     194        PyomoTaskPlugin._call_fini(self, *options, **kwds)
    195195        return self._retval
    196196
Note: See TracChangeset for help on using the changeset viewer.