Skip to content

Commit

Permalink
Lint fixes from autopep8.
Browse files Browse the repository at this point in the history
Command:
```
autopep8 --in-place --aggressive --aggressive --recursive --global-config=setup.cfg --max-line-length=100 .
```
  • Loading branch information
mik3y committed Jun 25, 2017
1 parent f14535c commit 013367f
Show file tree
Hide file tree
Showing 88 changed files with 1,509 additions and 1,232 deletions.
45 changes: 23 additions & 22 deletions bin/kegbot
Original file line number Diff line number Diff line change
Expand Up @@ -29,29 +29,30 @@ from pykeg.core.util import get_version
from pykeg.util import bugreport

if sys.version_info < (2, 7):
sys.stderr.write('Error: Kegbot needs Python 2.7 or newer.\n\n'
'Current version: %s\n' % sys.version)
sys.exit(1)
sys.stderr.write('Error: Kegbot needs Python 2.7 or newer.\n\n'
'Current version: %s\n' % sys.version)
sys.exit(1)

if __name__ == "__main__":
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "pykeg.settings")
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "pykeg.settings")

# Override some special commands.
if len(sys.argv) > 1:
cmd = sys.argv[1]
if cmd == 'version':
# Hack: Django's `version` command cannot be overridden the usual way.
print 'kegbot-server {}'.format(get_version())
sys.exit(0)
elif cmd == 'run_gunicorn':
# run_gunicorn was deprecated upstream.
cmd = 'gunicorn pykeg.web.wsgi:application {}'.format(' '.join(sys.argv[2:]))
sys.stderr.write('Warning: run_gunicorn is deprecated, call `{}` instead.\n'.format(cmd))
ret = subprocess.call(cmd, shell=True)
sys.exit(ret)
elif cmd == 'bugreport':
ret = bugreport.take_bugreport()
sys.exit(ret)
# Override some special commands.
if len(sys.argv) > 1:
cmd = sys.argv[1]
if cmd == 'version':
# Hack: Django's `version` command cannot be overridden the usual way.
print 'kegbot-server {}'.format(get_version())
sys.exit(0)
elif cmd == 'run_gunicorn':
# run_gunicorn was deprecated upstream.
cmd = 'gunicorn pykeg.web.wsgi:application {}'.format(' '.join(sys.argv[2:]))
sys.stderr.write(
'Warning: run_gunicorn is deprecated, call `{}` instead.\n'.format(cmd))
ret = subprocess.call(cmd, shell=True)
sys.exit(ret)
elif cmd == 'bugreport':
ret = bugreport.take_bugreport()
sys.exit(ret)

django.setup()
management.execute_from_command_line()
django.setup()
management.execute_from_command_line()
Loading

0 comments on commit 013367f

Please sign in to comment.