Skip to content

Commit

Permalink
Provide remote Pyro5 compatibility as well
Browse files Browse the repository at this point in the history
  • Loading branch information
pevogam committed Nov 13, 2024
1 parent 9c07390 commit fc518f2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion aexpect/remote_door.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@
from Pyro5 import server
# noinspection PyPackageRequirements
from Pyro5 import nameserver
ns_module = "Pyro5.nameserver"
except ImportError:
# noinspection PyPackageRequirements,PyUnresolvedReferences
import Pyro4
Expand All @@ -92,6 +93,7 @@ def __init__(self):
# noinspection PyPackageRequirements
from Pyro4 import naming as nameserver
nameserver.start_ns = nameserver.startNS
ns_module = "Pyro4.naming"

except ImportError:
logging.warning("Remote object backend (Pyro4) not found, some functionality"
Expand Down Expand Up @@ -848,7 +850,7 @@ def share_remote_objects(session, control_path, host="localhost", port=9090,

# setup remote objects server
LOG.info("Starting nameserver for the remote objects")
cmd = f"python -m Pyro4.naming -n {host} -p {port}"
cmd = f"python -m {ns_module} -n {host} -p {port}"
session.cmd("START " + cmd if os_type == "windows" else cmd + " &")

LOG.info("Starting the server daemon for the remote objects")
Expand Down

0 comments on commit fc518f2

Please sign in to comment.