Skip to content

Commit

Permalink
Updates the printed content from the config file (#209)
Browse files Browse the repository at this point in the history
Using mpconfig.settings prints the config properly. The msticpy would not work in the Juyiter notebook.

Also changed from pprint to just using plain Jason.dumps.

Co-authored-by: Ian Hellen <ianhelle@microsoft.com>
  • Loading branch information
Secretmud and ianhelle committed Apr 20, 2023
1 parent 527a912 commit 0865ae2
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions A Getting Started Guide For Azure Sentinel ML Notebooks.ipynb
Expand Up @@ -422,7 +422,7 @@
"import msticpy\n",
"from msticpy.config import MpConfigFile, MpConfigEdit\n",
"import os\n",
"import pprint\n",
"import json\n",
"from pathlib import Path\n",
"\n",
"mp_conf = \"msticpyconfig.yaml\"\n",
Expand All @@ -442,8 +442,7 @@
"else:\n",
" mpedit = MpConfigEdit(mp_conf)\n",
" mpconfig = MpConfigFile(mp_conf)\n",
" print(\"Configured Sentinel workspaces:\")\n",
" pprint.pprint(msticpy.settings.settings[\"AzureSentinel\"][\"Workspaces\"], compact=True)\n",
" print(f\"Configured Sentinel workspaces: {json.dumps(mpconfig.settings, indent=4)}\")\n",
"\n",
"msticpy.settings.refresh_config()"
]
Expand Down

0 comments on commit 0865ae2

Please sign in to comment.