Skip to content

Commit

Permalink
Use errno constants
Browse files Browse the repository at this point in the history
- Swap hard-coded error numbers with constants from the errno module.
  • Loading branch information
lowell80 committed Jun 24, 2019
1 parent 6f5ea75 commit 85947a3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions bumpversion/vcs.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import logging
import os
import subprocess
import errno
from tempfile import NamedTemporaryFile

from bumpversion.exceptions import (
Expand Down Expand Up @@ -51,8 +52,7 @@ def is_usable(cls):
== 0
)
except OSError as e:
if e.errno in (2, 13):
# VCS is not installed or permission denied then, ok.
if e.errno in (errno.ENOENT, errno.EACCES):
return False
raise

Expand Down

0 comments on commit 85947a3

Please sign in to comment.