Compare commits

..

No commits in common. "a11fd188a2c7c86da87b58bbe9576175f729ba83" and "88f71b240db9bbb81eb02eba82d42f9be9a0f072" have entirely different histories.

3 changed files with 3 additions and 5 deletions

View File

@ -1,7 +1,7 @@
# Maintainer: Evgeniy Alekseev # Maintainer: Evgeniy Alekseev
pkgname='ahriman' pkgname='ahriman'
pkgver=2.0.0rc11 pkgver=2.0.0rc10
pkgrel=1 pkgrel=1
pkgdesc="ArcH Linux ReposItory MANager" pkgdesc="ArcH Linux ReposItory MANager"
arch=('any') arch=('any')

View File

@ -19,7 +19,6 @@
# #
import importlib import importlib
import logging import logging
import os
from pathlib import Path from pathlib import Path
from types import ModuleType from types import ModuleType
@ -124,8 +123,7 @@ class TriggerLoader:
*package_path_parts, class_name = module_path.split(".") *package_path_parts, class_name = module_path.split(".")
package_or_path = ".".join(package_path_parts) package_or_path = ".".join(package_path_parts)
# it works for both missing permission and file does not exist if Path(package_or_path).is_file():
if os.access(Path(package_or_path), os.R_OK):
module = self._load_module_from_file(package_or_path, class_name) module = self._load_module_from_file(package_or_path, class_name)
else: else:
module = self._load_module_from_package(package_or_path) module = self._load_module_from_package(package_or_path)

View File

@ -17,4 +17,4 @@
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
# #
__version__ = "2.0.0rc11" __version__ = "2.0.0rc10"