Skip to content

Commit

Permalink
python: break circular import between future/rpc/handle
Browse files Browse the repository at this point in the history
  • Loading branch information
SteVwonder committed Feb 20, 2019
1 parent dac8f1e commit b050a22
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/bindings/python/flux/future.py
Expand Up @@ -10,7 +10,6 @@

import errno

import flux
from flux.util import check_future_error
from flux.wrapper import Wrapper, WrapperPimpl
from flux.core.inner import ffi, lib, raw
Expand Down Expand Up @@ -90,10 +89,13 @@ def get(self):
return ffi.buffer(result[0])

def get_flux(self):
# pylint: disable=cyclic-import
import flux.core.handle

flux_handle = self.pimpl.get_flux()
if flux_handle == ffi.NULL:
return None
return flux.Flux(handle=flux_handle)
return flux.core.handle.Flux(handle=flux_handle)

def get_reactor(self):
return self.pimpl.get_reactor()
Expand Down

0 comments on commit b050a22

Please sign in to comment.