carp: Check-in [efb85a3081]

A python graphical and terminal EncFS front-end

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Fix inotify now expect str as parameters
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256:efb85a3081918f26425e14cdd8cba01907d9a0cf7a7dc6a52524a1494d744b72
User & Date: milouse 2018-01-02 21:12:16
Context
2018-01-02
21:26
Fix another inotify breaking change check-in: d8c7c72322 user: milouse tags: trunk
21:12
Fix inotify now expect str as parameters check-in: efb85a3081 user: milouse tags: trunk
2017-10-12
19:08
Use a worryless blue colour for the icon shield check-in: 4287d13afd user: milouse tags: trunk
Changes

Changes to carp/stash_manager.py.

453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
...
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
        elif "IN_MOVED_FROM" in type_names or "IN_MOVED_TO" in type_names or \
             "IN_MOVE_SELF" in type_names:
            main_activity = "IN_MOVED"
        else:
            return 2

        message = "{} {}".format(
            os.path.join(watch_path, filename).decode("utf-8"),
            CARP_POSSIBLE_INOTIFY_STATUS[main_activity]
        )
        self.log_activity(stash_name, message)
        return 1

    def inotify_push_stash(self, stash_name):
        cmd = subprocess.run(["pgrep", "-u", getpass.getuser(), "rsync"],
................................................................................
            return True

        self.log_activity(stash_name, "Will sync NOW")
        self.push({"stash": stash_name, "test": False, "quiet": True})
        return False

    def inotify_loop(self, stash_name, stash_mount_point):
        i = inotify.adapters.InotifyTree(stash_mount_point.encode("utf-8"))

        must_sync = False
        sync_wait = 10

        # And see the corresponding events:
        for event in i.event_gen():
            if sync_wait == 0:







|







 







|







453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
...
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
        elif "IN_MOVED_FROM" in type_names or "IN_MOVED_TO" in type_names or \
             "IN_MOVE_SELF" in type_names:
            main_activity = "IN_MOVED"
        else:
            return 2

        message = "{} {}".format(
            os.path.join(watch_path, filename),
            CARP_POSSIBLE_INOTIFY_STATUS[main_activity]
        )
        self.log_activity(stash_name, message)
        return 1

    def inotify_push_stash(self, stash_name):
        cmd = subprocess.run(["pgrep", "-u", getpass.getuser(), "rsync"],
................................................................................
            return True

        self.log_activity(stash_name, "Will sync NOW")
        self.push({"stash": stash_name, "test": False, "quiet": True})
        return False

    def inotify_loop(self, stash_name, stash_mount_point):
        i = inotify.adapters.InotifyTree(stash_mount_point)

        must_sync = False
        sync_wait = 10

        # And see the corresponding events:
        for event in i.event_gen():
            if sync_wait == 0: