Skip to content

Commit

Permalink
markdown: Replace IOError with OSError
Browse files Browse the repository at this point in the history
  • Loading branch information
mitya57 committed Dec 8, 2024
1 parent f1fa471 commit 41ff7d5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions markups/markdown.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ def _load_extensions_list_from_yaml_file(
except yaml.YAMLError as ex:
warnings.warn(
f'Failed parsing {filename}: {ex}', SyntaxWarning)
raise IOError from ex
raise OSError from ex
if isinstance(data, list):
for item in data:
if isinstance(item, dict):
Expand All @@ -137,7 +137,7 @@ def _get_global_extensions(
yield from self._load_extensions_list_from_txt_file(choice)
else:
yield from self._load_extensions_list_from_yaml_file(choice)
except IOError:
except OSError:
continue # Cannot open file, move to the next choice
else:
break # File loaded successfully, skip the remaining choices
Expand Down

0 comments on commit 41ff7d5

Please sign in to comment.