diff --git a/delugeClient/__init__.py b/delugeClient/__init__.py index 3232ec7..74889f4 100644 --- a/delugeClient/__init__.py +++ b/delugeClient/__init__.py @@ -1,7 +1,8 @@ -import os -from sys import path +#!/usr/bin/env python3.6 +# -*- encoding: utf-8 -*- -path.append(os.path.dirname(__file__)) +from sys import path +from os.path import dirname, join path.append(dirname(__file__)) @@ -11,12 +12,14 @@ from utils import BASE_DIR, ColorizeFilter logger = logging.getLogger('deluge_cli') logger.setLevel(logging.DEBUG) -fh = logging.FileHandler(os.path.join(BASE_DIR, 'deluge_cli.log')) +fh = logging.FileHandler(join(BASE_DIR, 'deluge_cli.log')) fh.setLevel(logging.DEBUG) ch = logging.StreamHandler() ch.setLevel(logging.ERROR) formatter = logging.Formatter('%(asctime)s %(levelname)8s %(name)s | %(message)s') fh.setFormatter(formatter) + logger.addHandler(fh) -logger.addHandler(ch) \ No newline at end of file +logger.addHandler(ch) +logger.addFilter(ColorizeFilter()) \ No newline at end of file diff --git a/setup.py b/setup.py index 90fd34c..6744077 100644 --- a/setup.py +++ b/setup.py @@ -1,6 +1,8 @@ +#!/usr/bin/env python3 +# -*- encoding: utf-8 -*- from setuptools import setup, find_packages - -import delugeClient +from sys import path +from os.path import dirname with open("README.md", "r", encoding="utf-8") as fh: long_description = fh.read() @@ -21,12 +23,12 @@ setup( long_description_content_type="text/markdown", url="https://github.com/kevinmidboe/delugeClient", install_requires=[ - 'colored==1.4.2', - 'deluge-client==1.9.0', - 'docopt==0.6.2', - 'requests==2.25.1', - 'sshtunnel==0.4.0', - 'websockets==9.1' + 'colored', + 'deluge-client', + 'docopt', + 'requests', + 'sshtunnel', + 'websockets' ], classifiers=[ 'Programming Language :: Python', @@ -37,10 +39,5 @@ setup( 'console_scripts': [ 'delugeclient = delugeClient.__main__:main', ], - }, - packages=find_packages(), - package_data={ - 'delugeClient': ['default_config.ini'], - }, - python_requires=">=3.6", + } )