deb.git, scripts: Use cannot rather than can not for clarity
authorAndrej Shadura <andrew.shadura@collabora.co.uk>
Sat, 3 Apr 2021 12:50:40 +0000 (14:50 +0200)
committerGuido Günther <agx@sigxcpu.org>
Mon, 14 Feb 2022 16:41:18 +0000 (17:41 +0100)
"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 <andrew.shadura@collabora.co.uk>
gbp/deb/git.py
gbp/scripts/common/__init__.py
tests/component/deb/test_export_orig.py

index 4a17c2dba321bd0018e82269e7cc67354d9fac22..ed97f3e6e38c429057ec6ab4a906e5041547b704 100644 (file)
@@ -326,9 +326,9 @@ class DebianGitRepository(PkgGitRepository):
         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,
index 70e6f19d61be24ea2cc27797d90e7583fa2293d3..3ab3b3f738235c2e5c3d52f4ef430f25487d1aa9 100644 (file)
@@ -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
 
 
index 8ff759829df412a186ed377be3cfc029fdf306b4..22e9fa9d476dd656f8cccd0f0f539917fd142bdb 100644 (file)
@@ -112,7 +112,7 @@ class TestExportOrig(ComponentTestBase):
                            '--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 @@ class TestExportOrig(ComponentTestBase):
                            '--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'])