We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
changes
2 parents dec98e1 + 1e09636 commit 2319161Copy full SHA for 2319161
src/frequenz/channels/util/_file_watcher.py
@@ -10,7 +10,7 @@
10
from watchfiles import Change, awatch
11
from watchfiles.main import FileChange
12
13
-from .._base_classes import ChannelClosedError, Receiver
+from .._base_classes import Receiver
14
15
16
class FileWatcher(Receiver[pathlib.Path]):
@@ -90,8 +90,6 @@ def consume(self) -> pathlib.Path:
90
assert self._changes, "calls to `consume()` must be follow a call to `ready()`"
91
change = self._changes.pop()
92
# Tuple of (Change, path) returned by watchfiles
93
- if change is None or len(change) != 2:
94
- raise ChannelClosedError()
95
_, path_str = change
96
path = pathlib.Path(path_str)
97
return path
0 commit comments