Beispiel #1
0
from nacl.base import init_nacl
from vendor.docopt import docopt
import sys
# This is a BAD hack to avoid SSLContext Warnings of urllib3 in python <2.7.9
# See: https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning

if sys.version_info < (2, 7, 9):
    import logging
    logging.captureWarnings(True)

if __name__ == '__main__':
    arguments = docopt(__doc__, version='nacl-git version 0.1')
    # print(arguments)

# Before we do anything else, we check, if nacl will possibly work.
init_nacl()


# list all git repositories
if arguments['list'] or arguments['l']:
    list_salt_git_repositories()

if arguments['branch'] or arguments['b']:
    change_or_create_branch(arguments['BRANCH'])

if arguments['checkout'] or arguments['c']:
    checkout_branch(arguments['BRANCH'])

if arguments['mergeall']:
    merge_all_repositories()
Beispiel #2
0
 def test_init_nacl(self):
     self.assertTrue(init_nacl())