Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/commands
diff options
context:
space:
mode:
authorDaniel Narvaez <dwnarvaez@gmail.com>2013-01-14 11:01:37 (GMT)
committer Daniel Narvaez <dwnarvaez@gmail.com>2013-01-14 11:01:37 (GMT)
commita75122d1f6b3cbdfb6456e4e559d66e6b8d77e25 (patch)
treece0328a09fa930c30c289487c6976775334dedfb /commands
parent8be37beabcbaef276a45a44ff94c8ea293c3f05a (diff)
Make system check interactive in all commands
Diffstat (limited to 'commands')
-rwxr-xr-xcommands/check-system10
-rw-r--r--commands/common.py7
2 files changed, 7 insertions, 10 deletions
diff --git a/commands/check-system b/commands/check-system
index 4429d90..f92e491 100755
--- a/commands/check-system
+++ b/commands/check-system
@@ -14,17 +14,9 @@ parser.add_argument("--test", action="store_true",
help="don't add or remove packages, test only")
args = parser.parse_args()
-interactive = "SUGAR_BUILDBOT" not in os.environ
-
check_args = {"update": args.update,
"remove": args.remove,
"test": args.test,
- "interactive": interactive,
"lazy": False}
-setup_args = {"check_args": check_args}
-
-if not interactive:
- setup_args["log_name"] = "check-system"
-
-common.setup(**setup_args)
+common.setup(log_name="check-system", check_args=check_args)
diff --git a/commands/common.py b/commands/common.py
index c09da54..30bbdc2 100644
--- a/commands/common.py
+++ b/commands/common.py
@@ -9,6 +9,8 @@ from devbot import main
def setup(log_name=None, check_args={}):
+ is_buildbot = "SUGAR_BUILDBOT" in os.environ
+
config_args = {"config_dir": os.path.join(base_dir, "config"),
"install_dir": os.path.join(base_dir, "install"),
"source_dir": os.path.join(base_dir, "source"),
@@ -16,10 +18,13 @@ def setup(log_name=None, check_args={}):
"state_dir": os.path.join(base_dir, "state"),
"prefs_path": os.path.join(base_dir, "prefs"),
"logs_dir": os.path.join(base_dir, "logs"),
- "relocatable": "SUGAR_BUILDBOT" in os.environ}
+ "relocatable": is_buildbot}
if log_name:
config_args["log_name"] = log_name
+ if is_buildbot:
+ check_args["interactive"] = False
+
if not main.setup(config_args, check_args):
sys.exit(1)