Skip to content
This repository has been archived by the owner on Nov 29, 2021. It is now read-only.

Commit

Permalink
Add exception for PermissionError and FileNotFoundError.
Browse files Browse the repository at this point in the history
  • Loading branch information
jjnicola committed Sep 2, 2019
1 parent 5fd7037 commit 82b2b2a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion ospd/ospd.py
Original file line number Diff line number Diff line change
Expand Up @@ -1051,7 +1051,11 @@ def handle_get_performance(self, scan_et):

try:
output = subprocess.check_output(cmd)
except subprocess.CalledProcessError as e:
except (
subprocess.CalledProcessError,
PermissionError,
FileNotFoundError,
) as e:
raise OspdCommandError(
'Bogus get_performance format. %s' % e,
'get_performance'
Expand Down

0 comments on commit 82b2b2a

Please sign in to comment.