Files
training-labs/labs/stacktrain/core/cond_sleep.py
Roger Luethi 075bee7f11 Python port of osbash
This is a pretty direct port of osbash to Python.

The entry point is st.py; use ./st.py --help for help.

osbash.sh should work as before.

Implements: blueprint labs-python-port
Change-Id: Ifcccc420d58cbe907ce29542e4200803fa39e134
2016-12-18 11:47:44 +00:00

18 lines
480 B
Python

import time
import stacktrain.config.general as conf
import stacktrain.batch_for_windows as wbatch
# -----------------------------------------------------------------------------
# Conditional sleeping
# -----------------------------------------------------------------------------
def conditional_sleep(seconds):
# Don't sleep if we are just faking it for wbatch
if conf.do_build:
time.sleep(seconds)
if conf.wbatch:
wbatch.wbatch_sleep(seconds)