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 authored and c4urself committed Aug 24, 2019
1 parent 1ec857b commit d924c76
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 d924c76

Please sign in to comment.