summaryrefslogtreecommitdiffstats
path: root/base/deploy/src/scriptlets
diff options
context:
space:
mode:
Diffstat (limited to 'base/deploy/src/scriptlets')
-rw-r--r--base/deploy/src/scriptlets/pkihelper.py13
1 files changed, 7 insertions, 6 deletions
diff --git a/base/deploy/src/scriptlets/pkihelper.py b/base/deploy/src/scriptlets/pkihelper.py
index 92707c553..c1828ef41 100644
--- a/base/deploy/src/scriptlets/pkihelper.py
+++ b/base/deploy/src/scriptlets/pkihelper.py
@@ -33,6 +33,7 @@ import shutil
import string
import subprocess
import time
+from datetime import datetime
from grp import getgrgid
from grp import getgrnam
from pwd import getpwnam
@@ -1015,14 +1016,14 @@ class instance:
return None
def wait_for_startup(self, timeout):
- tries = 1
- status = self.get_instance_status()
+ start_time = datetime.today()
+ status = None
while status != "running":
- if tries >= timeout:
- return None
- time.sleep(1)
status = self.get_instance_status()
- tries = tries + 1
+ time.sleep(1);
+ stop_time = datetime.today()
+ if (stop_time - start_time).total_seconds() >= timeout:
+ break
return status
# PKI Deployment Directory Class