From 334b6866bd30909ac7641adfc4f8d2ff97fa3ef9 Mon Sep 17 00:00:00 2001 From: Daniel Mach Date: Wed, 10 Apr 2024 09:30:37 +0200 Subject: [PATCH] Replace invalid use of os.errno with errno module --- set_version | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/set_version b/set_version index 25f91b2..cd6e84e 100755 --- a/set_version +++ b/set_version @@ -16,6 +16,7 @@ from __future__ import print_function import argparse from contextlib import suppress +import errno import glob import os import re @@ -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: