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
Browse files Browse the repository at this point in the history
This happens when there is no permission to execute the external program
or the external program does not exist.
  • Loading branch information
jjnicola committed Sep 2, 2019
1 parent 5fd7037 commit c50a0c4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ospd/ospd.py
Original file line number Diff line number Diff line change
Expand Up @@ -1051,7 +1051,7 @@ def handle_get_performance(self, scan_et):

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

0 comments on commit c50a0c4

Please sign in to comment.