Skip to content

Commit

Permalink
fix(ps.py): added error handling for returned strings (#79)
Browse files Browse the repository at this point in the history
Co-authored-by: Mawson Sammons <[email protected]>
  • Loading branch information
MWSammons and Mawson Sammons authored May 15, 2024
1 parent b47d416 commit 0b3c5b6
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions dtcli/ps.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,10 @@ def ps(
return None
try:
files, policies = functions.ps(scope, dataset, verbose, quiet)
if isinstance(files, str) or isinstance(policies, str):
error_console.print("Error: files = ", files)
error_console.print("Error: policies = ", policies)
return None
except Exception as e:
error_console.print(e)
return None
Expand All @@ -83,6 +87,7 @@ def ps(

if files and ("error" in files.keys()):
error_console.print(files["error"])
return None

# Info table
elif files:
Expand Down

0 comments on commit 0b3c5b6

Please sign in to comment.