Add GNS3 console command "env" to show what environment variables are used. Ref https://github.com/GNS3/gns3-server/issues/2306

This commit is contained in:
grossmj
2024-02-14 19:29:07 +08:00
parent 21409a899d
commit fd2e236927

View File

@@ -19,6 +19,7 @@
Handles commands typed in the GNS3 console.
"""
import os
import sys
import cmd
import struct
@@ -34,6 +35,14 @@ log = logging.getLogger(__name__)
class ConsoleCmd(cmd.Cmd):
def do_env(self, args):
"""
Show the environment variables used by GNS3.
"""
for key, val in os.environ.items():
print("{}={}".format(key, val))
def do_version(self, args):
"""
Show the version of GNS3 and its dependencies.