Skip to content

Commit

Permalink
Fix/unify license spelling, linter fixes, declare GPLv2 using the cor…
Browse files Browse the repository at this point in the history
…rect SPDX identifier
  • Loading branch information
C0rn3j committed Sep 8, 2024
1 parent 38aea35 commit 97a3a11
Show file tree
Hide file tree
Showing 9 changed files with 11 additions and 7 deletions.
2 changes: 1 addition & 1 deletion ADDITIONAL-LICENSES
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ lib/jsonencoder.py is licensed under PSFL, https://www.python.org/download/relea
scripts/gamecontrollerdb.txt is taken from Simple DirectMedia Layer library and licensed under zlib license.
lib/xwrappers.py and lib/vdf.py are part of SC-Controller, licensed under GPL2 as rest of the project.

Everything else is licensed under GPL2, as described in 'LICENCE' file.
Everything else is licensed under GPL2, as described in 'LICENSE' file.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
12 changes: 8 additions & 4 deletions scc/gui/icon_chooser.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,10 @@
from scc.gui.editor import Editor
from scc.paths import get_menuicons_path
from scc.tools import find_icon
import os, traceback, logging, re
import os
import traceback
import logging
import re
log = logging.getLogger("IconChooser")
RE_URL = re.compile(r"(.*)(https?://[^ ]+)(.*)")
DEFAULT_ICON_CATEGORIES = ( "items", "media", "weapons", "system" )
Expand Down Expand Up @@ -47,7 +50,7 @@ def on_btUserFolder_activate_link(self, *a):
for c in DEFAULT_ICON_CATEGORIES:
try:
os.makedirs(os.path.join(get_menuicons_path(), c))
except:
except Exception:
# Dir. exists
pass

Expand Down Expand Up @@ -163,13 +166,14 @@ def on_menuicons_loaded(self, icons):
# Try to select 1st category, but ignore if that fails
tvCategories.get_selection().select_path(( 0, ))
self.on_tvCategories_cursor_changed(tvCategories)
except: pass
except Exception:
pass


@staticmethod
def find_license(path, name):
""" Parses LICENSE file, if any, and returns license for give file """
licensefile = os.path.join(path, "LICENCES")
licensefile = os.path.join(path, "LICENSES")
if not os.path.exists(licensefile):
return None
for line in open(licensefile, "r").readlines():
Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
] + [ # menu icons subfolders
(
'share/scc/images/menu-icons/' + x.split("/")[-1],
[ x + "/LICENCES" ] + glob.glob(x + "/*.png")
[ x + "/LICENSES" ] + glob.glob(x + "/*.png")
) for x in glob.glob("images/menu-icons/*")
]

Expand Down Expand Up @@ -62,7 +62,7 @@
'scripts/scc-osd-radial-menu',
'scripts/scc-osd-show-bindings',
],
license = 'GPL2',
license = 'GPL-2.0-only',
platforms = ['Linux'],
ext_modules = [
Extension('libuinput', sources = ['scc/uinput.c']),
Expand Down

0 comments on commit 97a3a11

Please sign in to comment.