Skip to content

Commit

Permalink
Ignore cryptography deprecation warnings in DEBUG
Browse files Browse the repository at this point in the history
It also fixes #158
  • Loading branch information
EvgeneOskin committed Dec 6, 2020
1 parent 71aff2c commit a60198d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
9 changes: 9 additions & 0 deletions termius/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,18 @@
# -*- coding: utf-8 -*-
"""Entrypoint for CLI tool."""
import sys
import os
import warnings
from termius.app import TermiusApp


if os.getenv('TERMIUS_CLI_DEBUG'):
warnings.filterwarnings(
'ignore', r'Python 2 is no longer supported by the Python core team. ',
UserWarning, r'termius'
)


def main(argv=None):
"""Process call from terminal."""
app = TermiusApp()
Expand Down
4 changes: 3 additions & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# and then run "tox" from this directory.

[tox]
envlist = py27,py35
envlist = py27,py36
skipsdist = True

[testenv]
Expand All @@ -15,6 +15,8 @@ commands =
paver completion_tests
paver bats
passenv = SERVERAUDITOR_USERNAME SERVERAUDITOR_PASSWORD
setenv =
TERMIUS_CLI_DEBUG = 1

[flake8]
exclude = .git*
Expand Down

0 comments on commit a60198d

Please sign in to comment.