fix a regression on the shell

parent 351d48ea
Pipeline #120187 passed with stage
in 2 minutes and 23 seconds
......@@ -7,7 +7,7 @@ import IPython
CONF_PATH = os.path.join(os.environ.get("HOME"), ".python-grid5000.yaml")
motd = (
MOTD = (
r"""
__ __
____ __ __/ /_/ /_ ____ ____
......@@ -22,12 +22,12 @@ motd = (
* Configuration loaded from %s
* A new client (variable gk) has been created for the user %s
* Start exploring the API through the gk variable
# Example: Get all available sites
$) gk.sites.list()
"""
% CONF_PATH
)
......@@ -35,8 +35,8 @@ def main():
path = pathlib.Path(CONF_PATH)
if not path.exists():
print("Configuratio file %s is missing" % CONF_PATH)
print("Configuration file %s is missing" % CONF_PATH)
return
_ = Grid5000.from_yaml(CONF_PATH)
gk = Grid5000.from_yaml(CONF_PATH)
motd = MOTD % (CONF_PATH, gk.username)
IPython.embed(header=motd)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment