diff options
author | Florian Bruhin <git@the-compiler.org> | 2016-07-23 14:15:39 +0200 |
---|---|---|
committer | Florian Bruhin <git@the-compiler.org> | 2016-07-23 14:15:39 +0200 |
commit | 02a06732ffc5a380208868f01aafb4a15b999874 (patch) | |
tree | e76d0045753b91993dc4ad1dcfe756839078f775 | |
parent | 78fd614237f9da733f958a1247e2b48c4e466fb9 (diff) | |
download | qutebrowser-02a06732ffc5a380208868f01aafb4a15b999874.tar.gz qutebrowser-02a06732ffc5a380208868f01aafb4a15b999874.zip |
Also ignore ImportWarning for pkg_resources import
-rw-r--r-- | qutebrowser/utils/qtutils.py | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/qutebrowser/utils/qtutils.py b/qutebrowser/utils/qtutils.py index 7d6da1dc6..1fea5e6c6 100644 --- a/qutebrowser/utils/qtutils.py +++ b/qutebrowser/utils/qtutils.py @@ -40,9 +40,13 @@ from PyQt5.QtWidgets import QApplication from qutebrowser.utils import log with log.ignore_py_warnings(category=PendingDeprecationWarning, module='imp'): - # This imports 'imp' and gives us a PendingDeprecationWarning on - # Debian Jessie. - import pkg_resources + with log.ignore_py_warnings(category=ImportWarning): + # This imports 'imp' and gives us a PendingDeprecationWarning on + # Debian Jessie. + # + # On Archlinux, we get ImportWarning from + # importlib/_bootstrap_external.py for modules with missing __init__. + import pkg_resources MAXVALS = { |