From 1885b618dd14607fdf1ba0b76c47fdf316ebe8e7 Mon Sep 17 00:00:00 2001 From: Ramin Yaghoubzadeh <ryaghoubzadeh@uni-bielefeld.de> Date: Thu, 21 Nov 2013 13:46:21 +0100 Subject: [PATCH] Corrected/added exceptions --- ipaacalib/python/src/ipaaca/__init__.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/ipaacalib/python/src/ipaaca/__init__.py b/ipaacalib/python/src/ipaaca/__init__.py index 67a11f0..cba0bc0 100755 --- a/ipaacalib/python/src/ipaaca/__init__.py +++ b/ipaacalib/python/src/ipaaca/__init__.py @@ -157,10 +157,15 @@ class IUNotFoundError(Exception): def __init__(self, iu_uid): super(IUNotFoundError, self).__init__('Lookup of IU ' + str(iu_uid) + ' failed.') -class IUPayloadLockTimeoutError(Exception) +class IUPayloadLockTimeoutError(Exception): """Error indicating that exclusive access to the Payload could not be obtained in time.""" def __init__(self, iu): - super(IUPayloadLockTimeoutError, self).__init__('Timeout while accessing payload of IU' + str(iu.uid) + '.') + super(IUPayloadLockTimeoutError, self).__init__('Timeout while accessing payload of IU ' + str(iu.uid) + '.') + +class IUPayloadLockedError(Exception): + """Error indicating that exclusive access to the Payload could not be obtained because someone actually locked it.""" + def __init__(self, iu): + super(IUPayloadLockedError, self).__init__('IU '+str(iu.uid)+' was locked during access attempt.') ## --- Generation Architecture ----------------------------------------------- -- GitLab