From 773ad6e834405ac4419dd094052c96ee9e44b96c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Dobranowski?= Date: Mon, 18 Apr 2022 17:09:03 +0200 Subject: [PATCH] Fix keyring problem --- cft/__init__.py | 2 +- cft/main.py | 6 +++++- requirements.txt | 3 ++- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/cft/__init__.py b/cft/__init__.py index 4574cc8..d07785c 100644 --- a/cft/__init__.py +++ b/cft/__init__.py @@ -1 +1 @@ -__version__ = '1.6.3' +__version__ = '1.6.4' diff --git a/cft/main.py b/cft/main.py index 9ab5420..0693db0 100644 --- a/cft/main.py +++ b/cft/main.py @@ -2,8 +2,8 @@ import argparse +import keyring import requests - from cft import __version__ from cft.utils.config import config from cft.utils.constants import * @@ -46,6 +46,10 @@ def main(): except requests.RequestException: print(error_style('Something went wrong. Check your internet connection.')) sys.exit() + except keyring.errors.NoKeyringError as e: + print(error_style('Keyring problem: '), e) + except Exception as e: + print(error_style('Error'), e) else: parser.print_help() try_upgrade() diff --git a/requirements.txt b/requirements.txt index 7203c9a..a858397 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,5 @@ keyring>=23.0.1 +keyrings.alt>=4.1.0 requests>=2.23.0 beautifulsoup4>=4.9.1 -sty>=1.0.0rc1 \ No newline at end of file +sty>=1.0.0rc1