Skip to content
This repository has been archived by the owner on Jul 19, 2021. It is now read-only.

Commit

Permalink
py3: enkf_main.py
Browse files Browse the repository at this point in the history
  • Loading branch information
Steinar Foss committed Mar 2, 2018
1 parent 9d2df12 commit a41531e
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions python/python/res/enkf/enkf_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,13 +111,12 @@ def _monkey_patch_methods(self, real_enkf_main):
# synchronized
from inspect import getmembers, ismethod
from functools import partial
methods = getmembers(_RealEnKFMain, predicate=ismethod)
dont_patch = [name for name, _ in getmembers(BaseCClass,
predicate=ismethod)]
methods = getmembers(self._real_enkf_main(), predicate=ismethod)
dont_patch = [name for name, _ in getmembers(BaseCClass)]
for name, method in methods:
if name.startswith('_') or name in dont_patch:
continue # skip private methods
setattr(self, name, partial(method, real_enkf_main))
setattr(self, name, method)

@staticmethod
def createNewConfig(config_file, storage_path, dbase_type, num_realizations):
Expand Down

0 comments on commit a41531e

Please sign in to comment.