From 334b6866bd30909ac7641adfc4f8d2ff97fa3ef9 Mon Sep 17 00:00:00 2001 From: Daniel Mach Date: Wed, 10 Apr 2024 09:30:37 +0200 Subject: [PATCH 1/3] 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: From 1b97390b0074b7aaa73eae00d5aff038fc9a6002 Mon Sep 17 00:00:00 2001 From: Daniel Mach Date: Wed, 10 Apr 2024 09:33:51 +0200 Subject: [PATCH 2/3] Fix unit tests set_version:236:41: E231 missing whitespace after ',' --- set_version | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/set_version b/set_version index cd6e84e..68f9d25 100755 --- a/set_version +++ b/set_version @@ -233,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'] From 8c9021db82a11e906a0345ed3dbef457149edd75 Mon Sep 17 00:00:00 2001 From: Daniel Mach Date: Wed, 10 Apr 2024 09:37:34 +0200 Subject: [PATCH 3/3] Mute warning about missing EMAIL env variable in unit tests dch warning: neither DEBEMAIL nor EMAIL environment variable is set dch warning: building email address from username and FQDN dch: Did you see those 2 warnings? Press RETURN to continue... --- .github/workflows/main.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index b1c03df..be7c013 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -14,6 +14,9 @@ jobs: runs-on: ubuntu-latest + env: + EMAIL: "nobody@example.com" + steps: - uses: actions/checkout@v2 - name: Set up Python 3.10