diff options
| author | Egor Tensin <egor@tensin.name> | 2026-06-30 20:07:53 +0200 |
|---|---|---|
| committer | Egor Tensin <egor@tensin.name> | 2026-06-30 20:22:30 +0200 |
| commit | 2e3c493339c2932b2ea3904f3fedc12fffa4b7c3 (patch) | |
| tree | b7ecae3c1c6e6d397c1e44e2625694152c02e2c9 | |
| parent | more copyable command lines (diff) | |
| download | cgitize-2e3c493339c2932b2ea3904f3fedc12fffa4b7c3.tar.gz cgitize-2e3c493339c2932b2ea3904f3fedc12fffa4b7c3.zip | |
prettier logsv8.0.2
Diffstat (limited to '')
| -rw-r--r-- | cgitize/cgit.py | 2 | ||||
| -rw-r--r-- | cgitize/utils.py | 6 |
2 files changed, 5 insertions, 3 deletions
diff --git a/cgitize/cgit.py b/cgitize/cgit.py index 0b9e381..1707f83 100644 --- a/cgitize/cgit.py +++ b/cgitize/cgit.py @@ -143,7 +143,7 @@ class CGitRepositories: ) return self._mirror(repo) - if f"{repo.clone_url}\n" != output: + if f"{repo.clone_url}" != output: # Jeez, there's a proper local repository in the target # directory already with a different upstream; something's # wrong, fix it manually. diff --git a/cgitize/utils.py b/cgitize/utils.py index f322516..53f8760 100644 --- a/cgitize/utils.py +++ b/cgitize/utils.py @@ -47,13 +47,15 @@ def run(*args, capture_output=False, **kwargs): stdout = subprocess.PIPE stderr = subprocess.STDOUT - logging.debug("Running: %s", subprocess.list2cmdline(args).rstrip()) + logging.debug("Running: %s", subprocess.list2cmdline(args)) result = subprocess.run( args, check=True, stdout=stdout, stderr=stderr, encoding="utf-8", **kwargs ) if result.stdout is not None: - logging.debug("\n%s", result.stdout) + if result.stdout[-1] == "\n": + result.stdout = result.stdout[:-1] + logging.debug("%s", result.stdout) return result.stdout |
