Explorar o código

Cope with pyinotify not being installed.

Jelmer Vernooij %!s(int64=4) %!d(string=hai) anos
pai
achega
c37b9ecf85
Modificáronse 2 ficheiros con 2 adicións e 1 borrados
  1. 1 1
      dulwich/tests/test_refs.py
  2. 1 0
      setup.py

+ 1 - 1
dulwich/tests/test_refs.py

@@ -326,7 +326,7 @@ class RefsContainerTests(object):
     def test_watch(self):
         try:
             watcher = self._refs.watch()
-        except NotImplementedError:
+        except (NotImplementedError, ImportError):
             self.skipTest('watching not supported')
         with watcher:
             self._refs[b'refs/remotes/origin/other'] = (

+ 1 - 0
setup.py

@@ -77,6 +77,7 @@ if has_setuptools:
         'fastimport': ['fastimport'],
         'https': ['urllib3[secure]>=1.24.1'],
         'pgp': ['gpg'],
+        'watch': ['pyinotify'],
         }
     setup_kwargs['install_requires'] = ['urllib3>=1.24.1', 'certifi']
     setup_kwargs['include_package_data'] = True