Skip to content

Fix remove watch+ base tree.event gen#8

Merged
Elias481 merged 6 commits intopending-fixesfrom
fix-remove_watch+_BaseTree.event_gen
Sep 19, 2018
Merged

Fix remove watch+ base tree.event gen#8
Elias481 merged 6 commits intopending-fixesfrom
fix-remove_watch+_BaseTree.event_gen

Conversation

@Elias481
Copy link
Copy Markdown
Owner

No description provided.

xaf and others added 6 commits July 29, 2018 01:22
The remove_watch method takes a superficial parameter but never used
it, which made the remove_watch_with_id function set it as False by default.
This fixes that behavior by propagating the parameter.

Signed-off-by: Raphaël Beamonte <raphael.beamonte@gmail.com>
The previous behavior was duplicating a block of code and making
one of the two useless. This fixes that by replacing the constant to
IN_DELETE instead of IN_MOVED_FROM in one of the two blocks.

Signed-off-by: Raphaël Beamonte <raphael.beamonte@gmail.com>
Propagate superficial parameter to remove_watch_with_id
Fix constant in adapter to match with DELETE events
…ith_fd] functions

_BaseTree.event_gen(): remove duplicate IN_MOVED_TO, change superficial to False for IN_MOVED_TO
Inotify.remove_watch_with_fd(): as this is a public function it should be possible to call this function without causing inconsitencies which are recoverable only with some dirty try/catch construct... there is also never a need to only remove the wfd from the adaptors list while keeping th path name in list.
 .. now functions remove_watch and remove_watch_with_fd are the same, only difference is parameter eighter pathname or watch-fd
addtionally bot functions now accept a thirst state (None) for superficial - used to skip the "superficial" actions and just remove the wd from inotify (there are use-cases for this, for example with threading to be able to disable wathing from one thread while watching thread get the notification about watch end from inotify an clean up the inotify "superficial").
@coveralls
Copy link
Copy Markdown

coveralls commented Sep 19, 2018

Pull Request Test Coverage Report for Build 20

  • 14 of 22 (63.64%) changed or added relevant lines in 1 file are covered.
  • 3 unchanged lines in 1 file lost coverage.
  • Overall coverage decreased (-2.2%) to 84.106%

Changes Missing Coverage Covered Lines Changed/Added Lines %
inotify/adapters.py 14 22 63.64%
Files with Coverage Reduction New Missed Lines %
inotify/adapters.py 3 82.71%
Totals Coverage Status
Change from base Build 5: -2.2%
Covered Lines: 254
Relevant Lines: 302

💛 - Coveralls

1 similar comment
@coveralls
Copy link
Copy Markdown

Pull Request Test Coverage Report for Build 20

  • 14 of 22 (63.64%) changed or added relevant lines in 1 file are covered.
  • 3 unchanged lines in 1 file lost coverage.
  • Overall coverage decreased (-2.2%) to 84.106%

Changes Missing Coverage Covered Lines Changed/Added Lines %
inotify/adapters.py 14 22 63.64%
Files with Coverage Reduction New Missed Lines %
inotify/adapters.py 3 82.71%
Totals Coverage Status
Change from base Build 5: -2.2%
Covered Lines: 254
Relevant Lines: 302

💛 - Coveralls

@Elias481 Elias481 merged commit 30f9a19 into pending-fixes Sep 19, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants