summaryrefslogtreecommitdiff
path: root/pygments/formatters/img.py
diff options
context:
space:
mode:
Diffstat (limited to 'pygments/formatters/img.py')
-rw-r--r--pygments/formatters/img.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/pygments/formatters/img.py b/pygments/formatters/img.py
index 55687505..78176e14 100644
--- a/pygments/formatters/img.py
+++ b/pygments/formatters/img.py
@@ -1,4 +1,3 @@
-# -*- coding: utf-8 -*-
"""
pygments.formatters.img
~~~~~~~~~~~~~~~~~~~~~~~
@@ -156,7 +155,7 @@ class FontManager:
valname = '%s%s%s' % (basename, style and ' '+style, suffix)
val, _ = _winreg.QueryValueEx(key, valname)
return val
- except EnvironmentError:
+ except OSError:
continue
else:
if fail:
@@ -190,7 +189,7 @@ class FontManager:
lookuperror = err
finally:
_winreg.CloseKey(key)
- except EnvironmentError:
+ except OSError:
pass
else:
# If we get here, we checked all registry keys and had no luck