Skip to content

Commit

Permalink
Add GNS3 console command "env" to show what environment variables are…
Browse files Browse the repository at this point in the history
… used. Ref GNS3/gns3-server#2306
  • Loading branch information
grossmj committed Feb 14, 2024
1 parent 21409a8 commit fd2e236
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions gns3/console_cmd.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
Handles commands typed in the GNS3 console.
"""

import os
import sys
import cmd
import struct
Expand All @@ -34,6 +35,14 @@

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.
Expand Down

0 comments on commit fd2e236

Please sign in to comment.