commit | eb433868757764e154d396d3627417747db9a743 | [log] [tgz] |
---|---|---|
author | ThiƩbaud Weksteen <tweek@google.com> | Thu Sep 17 09:28:35 2020 +0000 |
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | Thu Sep 17 09:28:35 2020 +0000 |
tree | 0979344bbadbb4084f6053c5dd3f798fc20f82de | |
parent | 9fed6d949cc19977ea51abd67579702cc59244da [diff] | |
parent | 573d316aa2a01cb56c8c707f7fc655e6ecc1db2a [diff] |
hooks: support Python 3.6 for ExclusionScope am: 573d316aa2 Original change: https://android-review.googlesource.com/c/platform/tools/repohooks/+/1428528 Change-Id: Ie5f6a45ff10bffed2d6e1a2da1115cb2a8202c3a
diff --git a/rh/hooks.py b/rh/hooks.py index b5350cd..491da91 100644 --- a/rh/hooks.py +++ b/rh/hooks.py
@@ -171,7 +171,7 @@ proj_dir: The relative path of the project. """ for exclusion_path in self._scope: - if isinstance(exclusion_path, re.Pattern): + if hasattr(exclusion_path, 'match'): if exclusion_path.match(proj_dir): return True elif fnmatch.fnmatch(proj_dir, exclusion_path):