From e9d386e962ead9515f082068089b6d9f0c6e8b57 Mon Sep 17 00:00:00 2001 From: Otto Liljalaakso Date: Mar 07 2023 21:46:15 +0000 Subject: Move warnings from missing Git repo to debug level Currently, all use outside of a Git repository prints the following warnings: > Failed to get repository name from Git url or pushurl > Failed to get ns from Git url or pushurl Since there are valid use cases for running outside of Git repository (such as working on a new package) and many operations work perfectly fine, and in case of errors, a more descriptive error is also printed, these notifications moved to debug level logging. Fixes #659. Signed-off-by: Otto Liljalaakso --- diff --git a/pyrpkg/__init__.py b/pyrpkg/__init__.py index c650851..9855059 100644 --- a/pyrpkg/__init__.py +++ b/pyrpkg/__init__.py @@ -594,7 +594,7 @@ class Commands(object): self._repo_name = repo_name return except rpkgError: - self.log.warning('Failed to get repository name from Git url or pushurl') + self.log.debug('Failed to get repository name from Git url or pushurl') self.load_nameverrel() if self._package_name_spec: @@ -634,7 +634,7 @@ class Commands(object): self._ns = None self.log.info("Could not find ns, distgit is not namespaced") except rpkgError: - self.log.warning('Failed to get ns from Git url or pushurl') + self.log.debug('Failed to get ns from Git url or pushurl') @property def ns_repo_name(self):