Skip to content

Commit 08c565c

Browse files
oliv3rclaude
andcommitted
Fixed: ChannelImporter skips channel set dirs without JSON manifest
When a channel package directory exists but contains only __pycache__ artifacts (e.g. stale bytecode, unfinished channel), the importer would crash with FileNotFoundError trying to load the missing JSON. Add an isfile() guard to silently skip incomplete channel set dirs. Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com> Signed-off-by: Olliver Schinagl <oliver@schinagl.nl>
1 parent 743dba1 commit 08c565c

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

resources/lib/helpers/channelimporter.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,9 @@ def get_channels(self, include_disabled=False, **kwargs): # NOSONAR
160160
continue
161161

162162
channel_set_info_path = os.path.join(channel_set_path, "chn_{}.json".format(channel_set))
163+
if not os.path.isfile(channel_set_info_path):
164+
Logger.warning(f"Skipping channel set '{channel_set}', no manifest found at: {channel_set_info_path}")
165+
continue
163166
channel_infos = ChannelInfo.from_json(channel_set_info_path)
164167

165168
# Check if the channel was updated

0 commit comments

Comments
 (0)