summaryrefslogtreecommitdiffstats
path: root/ansibleworks/__init__.py
blob: 176fe860c318130b05be533aa6193d950249380e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# Copyright (c) 2013 AnsibleWorks, Inc.
# All Rights Reserved.

__version__ = '1.2-b2'

import os
import sys

__all__ = ['__version__']

def manage():
    # Default to production mode unless being called from manage.py, which sets
    # the environment variable for development mode instead.
    os.environ.setdefault('DJANGO_SETTINGS_MODULE',
                          'ansibleworks.settings.production')
    from django.core.management import execute_from_command_line
    if len(sys.argv) >= 2 and sys.argv[1] in ('version', '--version'):
        sys.stdout.write('ansibleworks-%s\n' % __version__)
    else:
        execute_from_command_line(sys.argv)