Skip to content

Commit

Permalink
fix(shell.py): catch exceptions in category and subcategory generation
Browse files Browse the repository at this point in the history
Change-Id: I4d9140be440b0b149ab4b549373204ef2c63b368
  • Loading branch information
iranzo committed May 19, 2021
1 parent 90f2fc4 commit e3c8424
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion risuclient/shell.py
Original file line number Diff line number Diff line change
Expand Up @@ -410,7 +410,11 @@ def findplugins(
os.path.join(options.extraplugintree, extension), ""
)

category = os.path.normpath(subcategory).split(os.sep)[1] or ""
try:
category = os.path.normpath(subcategory).split(os.sep)[1]
except:
category = "root"
subcategory = " "

# Remove leading "/" (os.sep for safety)
if subcategory[0] == os.sep:
Expand Down

0 comments on commit e3c8424

Please sign in to comment.