forked from goodboy/tractor
Add help msg for non `__main__` modules as well
parent
439d320a25
commit
abb00531d3
|
@ -509,10 +509,17 @@ class Actor:
|
||||||
mne = ModuleNotExposed(*err.args)
|
mne = ModuleNotExposed(*err.args)
|
||||||
|
|
||||||
if ns == '__main__':
|
if ns == '__main__':
|
||||||
|
modpath = '__name__'
|
||||||
|
else:
|
||||||
|
modpath = f"'{ns}'"
|
||||||
|
|
||||||
msg = (
|
msg = (
|
||||||
"\n\nMake sure you exposed the current module using:\n\n"
|
"\n\nMake sure you exposed the target module, `{ns}`, "
|
||||||
"ActorNursery.start_actor(<name>, enable_modules="
|
"using:\n"
|
||||||
"[__name__])"
|
"ActorNursery.start_actor(<name>, enable_modules=[{mod}])"
|
||||||
|
).format(
|
||||||
|
ns=ns,
|
||||||
|
mod=modpath,
|
||||||
)
|
)
|
||||||
|
|
||||||
mne.msg += msg
|
mne.msg += msg
|
||||||
|
|
Loading…
Reference in New Issue