Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update python eossdk_utils.py debug_fn to return function values #61

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Commits on Sep 14, 2022

  1. Update python eossdk_utils.py debug_fn to return function values

    A @debug_fn wrapped function should also return the result of the function it executes, otherwise it returns None.
    
    class SomeAgent(eossdk.IntfHandler):
        def __init__(self, sdk):
            self.intf_mgr = sdk.get_intf_mgr()
            self.tracer = eossdk.Tracer('debug_fn_sample')
            eossdk.IntfHandler.__init__(self, self.intf_mgr)
    
        @debug_fn
        def get_value(self):
            return 'foo'
    
        def on_oper_status(self, intf_id_t, oper_status_t):
            value = self.get_value()  # returns None.
            assert value == 'foo'
    jpsenior authored Sep 14, 2022
    Configuration menu
    Copy the full SHA
    92237bb View commit details
    Browse the repository at this point in the history