safeeyes: update to 2.1.6.

This commit is contained in:
Julian Bigge 2023-11-06 14:57:09 +01:00 committed by Duncan Overbruck
parent 10c7c1495d
commit 576e350d2e
3 changed files with 32 additions and 17 deletions

View file

@ -1,13 +0,0 @@
diff --git a/safeeyes/utility.py b/safeeyes/utility.py
index bf2dede..7e08735 100644
--- a/safeeyes/utility.py
+++ b/safeeyes/utility.py
@@ -666,7 +666,7 @@ def has_method(module, method_name, no_of_args=0):
Check whether the given function is defined in the module or not.
"""
if hasattr(module, method_name):
- if len(inspect.getargspec(getattr(module, method_name)).args) == no_of_args:
+ if len(inspect.getfullargspec(getattr(module, method_name)).args) == no_of_args:
return True
return False

View file

@ -0,0 +1,28 @@
diff --git a/safeeyes/utility.py b/safeeyes/utility.py
index 76803e5..ad35134 100644
--- a/safeeyes/utility.py
+++ b/safeeyes/utility.py
@@ -21,9 +21,9 @@ This module contains utility functions for Safe Eyes and its plugins.
"""
import errno
-import imp
import inspect
import importlib
+import importlib.util
import json
import locale
import logging
@@ -354,11 +354,7 @@ def module_exist(module):
"""
Check wther the given Python module exists or not.
"""
- try:
- imp.find_module(module)
- return True
- except ImportError:
- return False
+ return importlib.util.find_spec(module) is not None
def merge_configs(new_config, old_config):

View file

@ -1,16 +1,16 @@
# Template file for 'safeeyes'
pkgname=safeeyes
version=2.1.4
revision=3
version=2.1.6
revision=1
build_style=python3-module
hostmakedepends="python3-setuptools python3-devel pkg-config"
makedepends="python3-devel cairo-devel libgirepository-devel"
depends="python3-psutil libayatana-appindicator python3-gobject python3-Babel
python3-dbus xprop alsa-utils python3-xlib"
checkdepends="$depends"
checkdepends="$depends python3-pip"
short_desc="Tool to reduce and prevent repetitive strain injury"
maintainer="Orphaned <orphan@voidlinux.org>"
license="GPL-3.0-or-later"
homepage="https://slgobinath.github.io/SafeEyes/"
distfiles="${PYPI_SITE}/s/safeeyes/safeeyes-${version}.tar.gz"
checksum=4ac651c8e0de611424da956ca4acdf25b4915ffce30fe33e69a2be6173eee821
checksum=b6fb014dfebecca07307968bf8b51c12f1388e65479e7a18d0be31a0a309d2f3