Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Patch for python 3.8 on GNU/Linux environment aka PosixPath #56

Merged
merged 1 commit into from
Dec 14, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 11 additions & 3 deletions livereload/watcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,9 +138,17 @@ def is_folder_changed(self, path, ignore=None):
return False

def is_glob_changed(self, path, ignore=None):
for f in glob.glob(path):
if self.is_file_changed(f, ignore):
return True
try:
for f in glob.glob(path):
if self.is_file_changed(f, ignore):
return True
except TypeError:
"""
Problem: on every ~10 times for some reason the glob returns Path instead of a string
TODO: Rewrite this block to use the python Path alongside string
aka pathlib introduced in Python 3.4
"""

return False


Expand Down