diff --git a/bumpversion/vcs.py b/bumpversion/vcs.py index 5df3592..0a577c4 100644 --- a/bumpversion/vcs.py +++ b/bumpversion/vcs.py @@ -2,6 +2,7 @@ from __future__ import unicode_literals, print_function +import errno import logging import os import subprocess @@ -51,8 +52,7 @@ def is_usable(cls): == 0 ) except OSError as e: - if e.errno == 2: - # mercurial is not installed then, ok. + if e.errno in (errno.ENOENT, errno.EACCES): return False raise