Пример #1
0
@file:        bw_client.py
@date:        09.12.2017
@author:      Bastian Schroll
@description: BOSWatch client application
"""
# pylint: disable=wrong-import-position
# pylint: disable=wrong-import-order

import sys
major_version = sys.version_info.major
assert major_version >= 3, "please use python3 to run BosWatch 3"

from boswatch.utils import paths

if not paths.makeDirIfNotExist(paths.LOG_PATH):
    print("cannot find/create log directory: %s", paths.LOG_PATH)
    exit(1)

import logging.config
logging.config.fileConfig(paths.CONFIG_PATH + "logger_client.ini")
logging.debug("")
logging.debug("######################## NEW LOG ############################")
logging.debug("BOSWatch client has started ...")

logging.debug("Import python modules")
import argparse
logging.debug("- argparse")
import queue
logging.debug("- queue")
import time
Пример #2
0
def test_makeDirExisting():
    """!load a local config file"""
    paths.makeDirIfNotExist("UnItTeSt")
    assert paths.makeDirIfNotExist("UnItTeSt")
    os.removedirs("UnItTeSt")