summaryrefslogtreecommitdiff
path: root/config.py
diff options
context:
space:
mode:
authorJoshua Ismael Haase Hernández <hahj87@gmail.com>2011-04-11 01:09:25 -0500
committerJoshua Ismael Haase Hernández <hahj87@gmail.com>2011-04-11 01:09:25 -0500
commit3fb5f8efef231dd7784be880934cd106603ab6f1 (patch)
treeb3f62a0fb712de3f0c5fea92f7171d6fbf3cd2b2 /config.py
parent61ee5da8b31b44e80e008619a32ca886d8799646 (diff)
bash-port ready for testing.
Diffstat (limited to 'config.py')
-rw-r--r--config.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/config.py b/config.py
index 8cf07a2..24ecfaf 100644
--- a/config.py
+++ b/config.py
@@ -1,4 +1,4 @@
-#!/usr/bin/pythonn
+#!/usr/bin/python
# -*- coding: utf-8 -*-
try:
from subprocess import check_output
@@ -7,22 +7,24 @@ except(ImportError):
import os
stringvars=("mirror", "mirrorpath", "logname", "tempdir", "docs_dir",
- "repodir", "rsync_blacklist")
+ "repodir", "rsync_blacklist")
listvars=("repo_list", "dir_list", "arch_list", "other",)
boolvars=("output", "debug",)
config=dict()
-def exit_if_none:
+def exit_if_none(var):
if os.environ.get(var) is None:
exit("%s is not defined" % var)
for var in stringvars:
exit_if_none(var)
- config[var]=os.environ.get(var)
+ config[var]=os.environ.get(var)
+
for var in listvars:
exit_if_none(var)
config[var]=tuple(os.environ.get(var).split(":"))
+
for var in boolvars:
exit_if_none(var)
if os.environ.get(var) == "True":