Skip to content

Commit

Permalink
Merge pull request #89 from dmach/fix-errno
Browse files Browse the repository at this point in the history
Replace invalid use of os.errno with errno module
  • Loading branch information
adrianschroeter authored Apr 10, 2024
2 parents 5586546 + 8c9021d commit 79ff927
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ jobs:

runs-on: ubuntu-latest

env:
EMAIL: "[email protected]"

steps:
- uses: actions/checkout@v2
- name: Set up Python 3.10
Expand Down
5 changes: 3 additions & 2 deletions 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 Expand Up @@ -232,7 +233,7 @@ class RevisionDetector(object):
@staticmethod
def _get_revision_from_osc_files():
from xml.etree import ElementTree
_filesname = os.path.join('.osc','_files')
_filesname = os.path.join('.osc', '_files')
_filesXML = ElementTree.parse(_filesname)
return _filesXML.getroot().attrib['rev']

Expand Down

0 comments on commit 79ff927

Please sign in to comment.