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

drop legacy IOError handling #893

Merged
merged 1 commit into from
Feb 28, 2024
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion sphinxcontrib/confluencebuilder/logger.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,5 +124,5 @@ def trace(container, data):
file.write('[%s]\n' % container)
file.write(data)
file.write('\n')
except (IOError, OSError) as err:
except OSError as err:
ConfluenceLogger.warn('unable to trace: %s' % err)
4 changes: 2 additions & 2 deletions sphinxcontrib/confluencebuilder/svg.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ def confluence_supported_svg(builder, node):
try:
with abs_path.open('rb') as f:
svg_data = f.read()
except (IOError, OSError) as err:
except OSError as err:
builder.warn('error reading svg: %s' % err)
return

Expand Down Expand Up @@ -203,7 +203,7 @@ def confluence_supported_svg(builder, node):
try:
with out_file.open('wb') as f:
f.write(svg_data)
except (IOError, OSError) as err:
except OSError as err:
builder.warn('error writing svg: %s' % err)
return

Expand Down
4 changes: 2 additions & 2 deletions sphinxcontrib/confluencebuilder/translator.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ def depart_document(self, node):
try:
with header_file.open(encoding='utf-8') as file:
header_template_data = file.read()
except (IOError, OSError) as err:
except OSError as err:
self.warn(f'error reading file {header_file}: {err}')

# if no data is supplied, the file is plain text
Expand All @@ -119,7 +119,7 @@ def depart_document(self, node):
try:
with footer_file.open(encoding='utf-8') as file:
footer_template_data = file.read()
except (IOError, OSError) as err:
except OSError as err:
self.warn(f'error reading file {footer_file}: {err}')

# if no data is supplied, the file is plain text
Expand Down