1
0
Fork 0
mirror of synced 2024-11-22 16:25:34 -05:00

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

View file

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