summaryrefslogtreecommitdiff
path: root/sphinx/directives/code.py
diff options
context:
space:
mode:
Diffstat (limited to 'sphinx/directives/code.py')
-rw-r--r--sphinx/directives/code.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/sphinx/directives/code.py b/sphinx/directives/code.py
index 1a1ce454e..2efa7f0a4 100644
--- a/sphinx/directives/code.py
+++ b/sphinx/directives/code.py
@@ -203,7 +203,7 @@ class LiteralIncludeReader(object):
return lines
except (IOError, OSError) as exc:
raise IOError(_('Include file %r not found or reading it failed') % filename)
- except UnicodeError as exc:
+ except UnicodeError:
raise UnicodeError(_('Encoding %r used for reading included file %r seems to '
'be wrong, try giving an :encoding: option') %
(self.encoding, filename))