Skip to content

Commit 72d1faa

Browse files
Fix key error when checking for UTILITIES_UNIT_TESTING env var (sonic-net#3563)
1 parent 008a078 commit 72d1faa

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pfc/main.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ def dump_config_to_json(self, table_name, namespace):
2828
This function dumps the current config in a JSON file for unit testing.
2929
"""
3030
# Only dump files in unit testing mode
31-
if os.environ["UTILITIES_UNIT_TESTING"] != "2":
31+
if os.getenv("UTILITIES_UNIT_TESTING") != "2":
3232
return
3333

3434
if namespace not in self.updated_port_tables.keys():

0 commit comments

Comments
 (0)