Skip to content
This repository has been archived by the owner on Mar 22, 2018. It is now read-only.

Commit

Permalink
service: get_oscmd now raises OSCmdError
Browse files Browse the repository at this point in the history
  • Loading branch information
ashcrow authored and mbarnes committed Mar 8, 2017
1 parent 4d5c876 commit 8eaedc4
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/commissaire_service/oscmd/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,15 @@

import importlib

from commissaire.errors import CommissaireError


class OSCmdError(CommissaireError):
"""
OSCmd specific errors.
"""
pass


class OSCmdBase:
"""
Expand Down Expand Up @@ -113,5 +122,4 @@ def get_oscmd(os_type):
module = importlib.import_module(module_name)
return getattr(module, 'OSCmd')
except ImportError:
# TODO: Make this a specific exception
raise Exception('No OSCmd class for {}'.format(os_type))
raise OSCmdError('No OSCmd class for {}'.format(os_type))

0 comments on commit 8eaedc4

Please sign in to comment.