4 Commits
3 changed files with 13 additions and 10 deletions
@@ -1,9 +1,9 @@
# Copyright 2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
PYTHON_COMPAT=( python3_{8..11} )
DISTUTILS_USE_SETUPTOOLS=rdepend
EAPI=8
PYTHON_COMPAT=( python3_{13..14} )
DISTUTILS_USE_PEP517=setuptools
SCM=""
if [ "${PV#9999}" != "${PV}" ] ; then
+7 -4
View File
@@ -36,7 +36,7 @@ from pyinotify import ProcessEvent, ExcludeFilter
from pyinotifyd._install import install, uninstall
from pyinotifyd.scheduler import TaskScheduler, Cancel
__version__ = "0.0.9"
__version__ = "1.0.1"
def setLoglevel(loglevel, logname=None):
@@ -203,7 +203,9 @@ class Watch:
do_glob=True)
self._notifier = pyinotify.AsyncioNotifier(
self._watch_manager, asyncio.get_event_loop(), default_proc_fun=self._event_map)
self._watch_manager,
asyncio.get_event_loop(),
default_proc_fun=self._event_map)
def stop(self):
self._notifier.stop()
@@ -226,7 +228,7 @@ class Pyinotifyd:
config = {}
name = Pyinotifyd.name
exec("from logging import DEBUG, INFO, WARNING, ERROR, CRITICAL",
config)
config)
exec(f"from {name} import Pyinotifyd, Watch", config)
exec(f"from {name} import setLoglevel, enableSyslog", config)
exec(f"from {name}.scheduler import *", config)
@@ -456,7 +458,7 @@ def main():
f"%(asctime)s - {name}/%(name)s - %(levelname)s - %(message)s")
ch.setFormatter(formatter)
loop = asyncio.get_event_loop()
loop = asyncio.new_event_loop()
loop.add_signal_handler(
signal.SIGTERM, lambda: loop.create_task(
daemon.shutdown("SIGTERM")))
@@ -466,6 +468,7 @@ def main():
loop.add_signal_handler(
signal.SIGHUP, lambda: loop.create_task(
daemon.reload("SIGHUP", args.config, args.debug)))
asyncio.set_event_loop(loop)
daemon.start()
loop.run_forever()
+3 -3
View File
@@ -36,8 +36,8 @@
#move_rule = Rule(
# action="move",
# src_re="^/src_path/(?P<path>.*).to_move",
# dst_re="/dst_path/\g<path>.moved",
# src_re=r"^/src_path/(?P<path>.*).to_move",
# dst_re=r"/dst_path/\g<path>.moved",
# auto_create=True,
# filemode=0o755,
# dirmode=0o644,
@@ -47,7 +47,7 @@
#delete_rule = Rule(
# action="delete",
# src_re="^/src_path/(?P<path>.*).to_delete",
# src_re=r"^/src_path/(?P<path>.*).to_delete",
# rec=False)
#file_sched = FileManagerScheduler(