From 26631a7a22b688b18fdfa094bdfb3101cd45ca20 Mon Sep 17 00:00:00 2001 From: Juhani Numminen Date: Sat, 27 Jul 2019 20:51:41 +0300 Subject: [PATCH] Remove checks for individual cardsets' COPYRIGHT files It is not strictly necessary to check the presence of the COPYRIGHT file since pysollib/{tile,tk}/selectcardset.py will work even if it's missing. In the Debian package, individual COPYRIGHT files are missing as all license information should be in one file anyway, /usr/share/doc/pysolfc/copyright. Thanks to Bernhard Reiter who originally wrote this patch: https://salsa.debian.org/games-team/pysolfc/blob/87493fb/debian/patches/remove_checks_for_copyright_files --- pysollib/app.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/pysollib/app.py b/pysollib/app.py index 60f7e470..e5ddbdd6 100644 --- a/pysollib/app.py +++ b/pysollib/app.py @@ -1211,11 +1211,10 @@ Please select a %s type %s. d = os.path.join(dirname, name) if not os.path.isdir(d): continue - f1 = os.path.join(d, "config.txt") - f2 = os.path.join(d, "COPYRIGHT") - if os.path.isfile(f1) and os.path.isfile(f2): + f = os.path.join(d, "config.txt") + if os.path.isfile(f): try: - cs = self._readCardsetConfig(d, f1) + cs = self._readCardsetConfig(d, f) if cs: # from pprint import pprint # print cs.name @@ -1232,7 +1231,7 @@ Please select a %s type %s. fnames[cs.name] = 1 else: print_err('fail _readCardsetConfig: %s %s' - % (d, f1)) + % (d, f)) pass except Exception: # traceback.print_exc()