Commit f6ea8ff7 authored by Steve Goering's avatar Steve Goering

style checks

parent d42186b4
"moduls_directory": "tools/",
"allowed_scripts": ["python", "bash"],
"ignored_dirs": ["CVS"]
"ignored_dirs": ["CVS"],
"update": "core/",
"version": "core/"
\ No newline at end of file
......@@ -28,13 +28,11 @@ def get_random_msg():
return unescape(output)
def main(params):
max_i = shutil.get_terminal_size().columns
for j in range(3):
for i in range(0, max_i):
......@@ -8,10 +8,11 @@ Authors: Steve Göring, Martin Potthast
import argparse
import collections
import json
import loader
import os
import sys
import loader
from lib import *
from log import *
from system import *
......@@ -34,7 +35,7 @@ def get_commands(config):
# renamed to "command".
for directory in os.listdir(config["moduls_directory"]):
if (os.path.isdir(config["moduls_directory"] + directory) and
directory not in config["ignored_dirs"]):
directory not in config["ignored_dirs"]):
commands[directory] = config["moduls_directory"] + directory
return commands
......@@ -101,8 +102,8 @@ def main(args):
# TODO: It is conceivable to introduce aliases for each command, but it
# is unclear where to obtain them. Simply using a prefix does not
# work for betamng and betaweb, since they share a long prefix.
commandparser = commandparsers.add_parser(command,
help='TODO: Help message for commands.')
commandparser = commandparsers.add_parser(
command, help='TODO: Help message for commands.')
subparsers[command] = commandparser
subcommandparsers = commandparser.add_subparsers(
metavar='<subcommand>', dest='<subcommand>',
......@@ -112,7 +113,7 @@ def main(args):
for subcommand in subcommands:
subcommandparser = subcommandparsers.add_parser(
subcommand, help=str(
subparsers[subcommand] = subcommandparser
......@@ -123,15 +124,16 @@ def main(args):
parseresults = parser.parse_known_args(args)
argsdict = vars(parseresults[0])
parameter = parseresults[1]
if len(argsdict) == 2 and argsdict['<subcommand>'] == None:
if len(argsdict) == 2 and argsdict['<subcommand>'] is None:
return 0
return run_subcommand(argsdict['<subcommand>'],
allcommands[argsdict['<command>']][argsdict['<subcommand>']], parameter)
return run_subcommand(
if __name__ == "__main__":
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment