mirror of
1
0
Fork 0

Fix style

Fix formatting of keyword arguments according to PEP 8.
This commit is contained in:
Anish Athalye 2015-04-24 18:26:20 -04:00
parent bdc1b2205f
commit fd08ddacd3
2 changed files with 14 additions and 14 deletions

View File

@ -5,18 +5,18 @@ from .messenger import Messenger
from .messenger import Level
def add_options(parser):
parser.add_argument('-Q', '--super-quiet', dest = 'super_quiet', action = 'store_true',
help = 'suppress almost all output')
parser.add_argument('-q', '--quiet', dest = 'quiet', action = 'store_true',
help = 'suppress most output')
parser.add_argument('-v', '--verbose', dest = 'verbose', action = 'store_true',
help = 'enable verbose output')
parser.add_argument('-d', '--base-directory', nargs = 1,
dest = 'base_directory', help = 'execute commands from within BASEDIR',
metavar = 'BASEDIR', required = True)
parser.add_argument('-c', '--config-file', nargs = 1, dest = 'config_file',
help = 'run commands given in CONFIGFILE', metavar = 'CONFIGFILE',
required = True)
parser.add_argument('-Q', '--super-quiet', dest='super_quiet', action='store_true',
help='suppress almost all output')
parser.add_argument('-q', '--quiet', dest='quiet', action='store_true',
help='suppress most output')
parser.add_argument('-v', '--verbose', dest='verbose', action='store_true',
help='enable verbose output')
parser.add_argument('-d', '--base-directory', nargs=1,
dest='base_directory', help='execute commands from within BASEDIR',
metavar='BASEDIR', required=True)
parser.add_argument('-c', '--config-file', nargs=1, dest='config_file',
help='run commands given in CONFIGFILE', metavar='CONFIGFILE',
required=True)
def read_config(config_file):
reader = ConfigReader(config_file)

View File

@ -41,8 +41,8 @@ class CommandRunner(Executor):
self._log.lowinfo(cmd)
else:
self._log.lowinfo('%s [%s]' % (msg, cmd))
ret = subprocess.call(cmd, shell = True, stdin = stdin, stdout = stdout,
stderr = stderr, cwd = self._base_directory)
ret = subprocess.call(cmd, shell=True, stdin=stdin, stdout=stdout,
stderr=stderr, cwd=self._base_directory)
if ret != 0:
success = False
self._log.warning('Command [%s] failed' % cmd)