From 836eb540088ca62247daea29ba3c80f89b37a4eb Mon Sep 17 00:00:00 2001 From: Juhani Numminen Date: Tue, 6 Aug 2019 14:06:33 +0300 Subject: [PATCH] Add an error message to pysol_cards version check --- pysollib/pysolrandom.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pysollib/pysolrandom.py b/pysollib/pysolrandom.py index b747cd4b..3cf09412 100644 --- a/pysollib/pysolrandom.py +++ b/pysollib/pysolrandom.py @@ -36,8 +36,8 @@ except ImportError: "You need to install " + "https://pypi.python.org/pypi/random2 using pip or similar.") -assert ((pysol_cards.VERSION if 'VERSION' in pysol_cards.__dict__ - else (0, 0, 0)) >= (0, 8, 5)) +assert getattr(pysol_cards, 'VERSION', (0, 0, 0)) >= (0, 8, 5), ( + "Newer version of https://pypi.org/project/pysol-cards is required.") from pysol_cards.random_base import RandomBase # noqa: I100 from pysol_cards.random import match_ms_deal_prefix # noqa: I100