Skip to content

Commit 61b39fb

Browse files
committed
refactor exceptions
1 parent 39c2827 commit 61b39fb

File tree

3 files changed

+4
-8
lines changed

3 files changed

+4
-8
lines changed

src/sasctl/_services/service.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88

99
from .. import core
1010
from ..core import sasctl_command, HTTPError
11+
from ..exceptions import JobTimeoutError
1112

1213

1314
class Service(object):
@@ -362,4 +363,4 @@ def completed(job):
362363
if completed(job):
363364
return job
364365
else:
365-
raise core.TimeoutError('Timeout while waiting on job %s' % job)
366+
raise JobTimeoutError('Timeout while waiting on job %s' % job)

src/sasctl/core.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -920,10 +920,3 @@ def is_available():
920920
response = current_session().head(service_root + '/')
921921
return response.status_code == 200
922922
return is_available
923-
924-
925-
class SasctlError(Exception):
926-
pass
927-
928-
class TimeoutError(SasctlError):
929-
pass

src/sasctl/exceptions.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,5 @@ def __init__(self, username, *args, **kwargs):
1313
super(AuthenticationError, self).__init__(msg, *args, **kwargs)
1414

1515

16+
class JobTimeoutError(RuntimeError):
17+
pass

0 commit comments

Comments
 (0)