Skip to content

Commit

Permalink
Refactor code
Browse files Browse the repository at this point in the history
  • Loading branch information
cryzed committed Feb 1, 2020
1 parent d1d51b9 commit 7702edf
Show file tree
Hide file tree
Showing 5 changed files with 189 additions and 155 deletions.
74 changes: 69 additions & 5 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
[tool.poetry]
name = "TrafficToll"
version = "1.3.0"
version = "1.3.1"
description = "NetLimiter-like bandwidth limiting and QoS for Linux"
authors = ["cryzed <[email protected]>"]
authors = ["Chris Braun <[email protected]>"]

license='GPLv3'
readme='README.md'
Expand All @@ -15,7 +15,7 @@ include=['LICENSE', 'example.yaml']
tt = 'traffictoll.__main__:main'

[tool.poetry.dependencies]
python = "^3.7"
python = "^3.6"
psutil = "^5.6.7"
loguru = "^0.4.1"
"ruamel.yamL" = "^0.16.6"
Expand Down
4 changes: 3 additions & 1 deletion traffictoll/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from loguru import logger

from .cli import get_argument_parser, main as cli_main
from .exceptions import DependencyError
from .exceptions import ConfigError, DependencyError


def main() -> None:
Expand All @@ -17,6 +17,8 @@ def main() -> None:
cli_main(arguments)
except KeyboardInterrupt:
logger.info("Aborted")
except ConfigError as error:
logger.error("Invalid configuration: {}", error)
except DependencyError as error:
logger.error("Missing dependency: {}", error)
except Exception:
Expand Down
Loading

0 comments on commit 7702edf

Please sign in to comment.