diff --git a/grid5000/cli.py b/grid5000/cli.py index 4a58df9daaaaf874a85eb0b5c9bdffb4b12073c5..a3803b0e32e6819abc063a15ace72beacf294e60 100644 --- a/grid5000/cli.py +++ b/grid5000/cli.py @@ -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)