aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'repoman/pym/repoman/errors.py')
-rw-r--r--repoman/pym/repoman/errors.py22
1 files changed, 22 insertions, 0 deletions
diff --git a/repoman/pym/repoman/errors.py b/repoman/pym/repoman/errors.py
new file mode 100644
index 000000000..9cf113ba0
--- /dev/null
+++ b/repoman/pym/repoman/errors.py
@@ -0,0 +1,22 @@
+# -*- coding:utf-8 -*-
+
+from __future__ import print_function, unicode_literals
+
+import sys
+
+
+def warn(txt):
+ print("repoman: " + txt)
+
+
+def err(txt):
+ warn(txt)
+ sys.exit(1)
+
+
+def caterror(catdir, repodir):
+ err(
+ "%s is not an official category."
+ " Skipping QA checks in this directory.\n"
+ "Please ensure that you add %s to %s/profiles/categories\n"
+ "if it is a new category." % (catdir, catdir, repodir))