Skip to content

Commit

Permalink
Replace invalid use of os.errno with errno module
Browse files Browse the repository at this point in the history
  • Loading branch information
dmach committed Apr 10, 2024
1 parent 5586546 commit 334b686
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion set_version
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ from __future__ import print_function

import argparse
from contextlib import suppress
import errno
import glob
import os
import re
Expand Down Expand Up @@ -126,7 +127,7 @@ class VersionDetector(object):

if not os.path.exists(self.versionfile):
logging.debug(" - file: %s does not exist", self.versionfile)
raise OSError(os.errno.ENOENT, os.strerror(os.errno.ENOENT),
raise OSError(errno.ENOENT, os.strerror(errno.ENOENT),
self.versionfile)

with codecs.open(self.versionfile, 'r', 'utf8') as fp:
Expand Down

0 comments on commit 334b686

Please sign in to comment.