From c223f13efcc3cf71a58eb9f3a15484fdbe1fc475 Mon Sep 17 00:00:00 2001 From: Andrej Shadura Date: Sat, 3 Apr 2021 14:50:40 +0200 Subject: [PATCH] deb.git, scripts: Use cannot rather than can not for clarity "Can not" may in some cases mean something different than "cannot", use "cannot" to make sure there are no misunderstandings. Signed-off-by: Andrej Shadura --- gbp/deb/git.py | 4 ++-- gbp/scripts/common/__init__.py | 2 +- tests/component/deb/test_export_orig.py | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/gbp/deb/git.py b/gbp/deb/git.py index 4a17c2db..ed97f3e6 100644 --- a/gbp/deb/git.py +++ b/gbp/deb/git.py @@ -326,9 +326,9 @@ def create_upstream_tarball_via_pristine_tar(self, source, output_dir, comp, ups gbp.log.debug("upstream signature state: %s" % upstream_signatures) commit, found_signature = self.get_pristine_tar_commit(source, component) if not commit and self.has_pristine_tar_branch(): - raise GitRepositoryError("Can not find pristine tar commit for archive '%s'" % output) + raise GitRepositoryError("Cannot find pristine tar commit for archive '%s'" % output) if not found_signature and upstream_signatures.is_on(): - raise GitRepositoryError("Can not find requested upstream signature for archive '%s' in pristine tar commit." % output) + raise GitRepositoryError("Cannot find requested upstream signature for archive '%s' in pristine tar commit." % output) try: signature = False if upstream_signatures.is_off() else found_signature self.pristine_tar.checkout(source.name, source.upstream_version, comp.type, output_dir, diff --git a/gbp/scripts/common/__init__.py b/gbp/scripts/common/__init__.py index 70e6f19d..3ab3b3f7 100644 --- a/gbp/scripts/common/__init__.py +++ b/gbp/scripts/common/__init__.py @@ -71,7 +71,7 @@ def get_component_tarballs(name, version, tarball, components): sig = None tarballs.append(DebianAdditionalTarball(cname, component, sig=sig)) if not os.path.exists(cname): - raise GbpError("Can not find component tarball %s" % cname) + raise GbpError("Cannot find component tarball %s" % cname) return tarballs diff --git a/tests/component/deb/test_export_orig.py b/tests/component/deb/test_export_orig.py index 8ff75982..22e9fa9d 100644 --- a/tests/component/deb/test_export_orig.py +++ b/tests/component/deb/test_export_orig.py @@ -112,7 +112,7 @@ def test_pristine_tar_commit_non_existent(self): '--component=foo', '--pristine-tar']) ok_(ret == 1, "Exporting tarballs must fail") - self._check_log(-1, "gbp:error: Can not find pristine tar commit for archive 'hello-debhelper_2.8.orig.tar.gz'") + self._check_log(-1, "gbp:error: Cannot find pristine tar commit for archive 'hello-debhelper_2.8.orig.tar.gz'") def test_tarball_dir_version_replacement(self): """Test that generating tarball from directory version substitution works""" @@ -220,7 +220,7 @@ def test_pristine_tar_upstream_signatures_without(self): '--pristine-tar', '--upstream-signatures=on']) ok_(ret == 1, "Exporting tarballs must fail") - self._check_log(-1, "gbp:error: Can not find requested upstream signature for archive " + self._check_log(-1, "gbp:error: Cannot find requested upstream signature for archive " "'hello-debhelper_2.6.orig.tar.gz' in pristine tar commit.") @RepoFixtures.quilt30(opts=['--pristine-tar'])