summaryrefslogtreecommitdiff
path: root/giscanner/utils.py
diff options
context:
space:
mode:
authorChristoph Reiter <reiter.christoph@gmail.com>2018-08-10 11:19:58 +0200
committerChristoph Reiter <reiter.christoph@gmail.com>2018-08-15 10:43:55 +0200
commit14dcc4a4f961bd6dd1d84ec858e0378cf43afa8b (patch)
tree356698c18599c17062e1f102b04f52558a94efc0 /giscanner/utils.py
parentf2be65b417b7179f5490c0735d053bd466f7f317 (diff)
downloadgobject-introspection-14dcc4a4f961bd6dd1d84ec858e0378cf43afa8b.tar.gz
tests: depend on flake8 instead of including pep8/pyflakes
g-i includes an old version of pep8 and pyflakes and uses that during "make check". It (1) doesn't catch all cases newer versions of pycodestyle/pyflakes catch and (2) doesn't test all Python files (3) doesn't work with meson. Instead of updating just remove them and depend on flake8 instead. To run the checks simply run flake8 in the root dir. This also makes it possible to run those checks when using meson and not autotools. To not get test suite failures on flake8 updates move the checks from "make check" to an extra "make check.quality" target.
Diffstat (limited to 'giscanner/utils.py')
-rw-r--r--giscanner/utils.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/giscanner/utils.py b/giscanner/utils.py
index 2feddab0..67d6a17f 100644
--- a/giscanner/utils.py
+++ b/giscanner/utils.py
@@ -55,6 +55,7 @@ def break_on_debug_flag(flag):
import pdb
pdb.set_trace()
+
# Copied from h2defs.py
_upperstr_pat1 = re.compile(r'([^A-Z])([A-Z])')
_upperstr_pat2 = re.compile(r'([A-Z][A-Z])([A-Z][0-9a-z])')
@@ -263,7 +264,7 @@ def get_user_cache_dir(dir=None):
xdg_cache_home = os.path.join(xdg_cache_home, dir)
try:
makedirs(xdg_cache_home, mode=0o755, exist_ok=True)
- except:
+ except EnvironmentError:
# Let's fall back to ~/.cache below
pass
else:
@@ -276,7 +277,7 @@ def get_user_cache_dir(dir=None):
cachedir = os.path.join(cachedir, dir)
try:
makedirs(cachedir, mode=0o755, exist_ok=True)
- except:
+ except EnvironmentError:
return None
else:
return cachedir