projects
/
rnaseq-cwl-training.git
/ blobdiff
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Starting on tool to check repository settings.
[rnaseq-cwl-training.git]
/
bin
/
util.py
diff --git
a/bin/util.py
b/bin/util.py
index 2341bdb006b9bfae5d85243cc5d13dfe60e3b652..df350e7a7895bdfc656b1e64c3a66eead0a715d0 100644
(file)
--- a/
bin/util.py
+++ b/
bin/util.py
@@
-151,3
+151,11
@@
def check_unwanted_files(dir_path, reporter):
reporter.check(not os.path.exists(path),
path,
"Unwanted file found")
+
+
+def require(condition, message):
+ """Fail if condition not met."""
+
+ if not condition:
+ print(message, file=sys.stderr)
+ sys.exit(1)