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):