#! /usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright (c) 2015 Red Hat
# Licensed under The MIT License (MIT)
# http://opensource.org/licenses/MIT
#

import sys
import logging

from pdc_client.runner import Runner


if __name__ == '__main__':
    # This is a bit of a hack - we need to set the debug mode before the
    # arguments are parsed, since parsing arguments depends on plugins, and
    # loading plugins may log debug messages.
    logging.basicConfig(level=logging.DEBUG if '--debug' in sys.argv else logging.WARNING)
    runner = Runner()
    runner.setup()
    runner.run()
