From 6e8b681ce62a9bd01fb2382ca969da9bced87e07 Mon Sep 17 00:00:00 2001 From: Nils Philippsen Date: Apr 03 2020 17:17:43 +0000 Subject: Strip trailing slashes from repo paths Sorts out crashes when tab-expanding appends the slash to the directory name. Signed-off-by: Nils Philippsen --- diff --git a/rpmautospec/changelog.py b/rpmautospec/changelog.py index 257cb21..1a432c4 100644 --- a/rpmautospec/changelog.py +++ b/rpmautospec/changelog.py @@ -245,6 +245,6 @@ def produce_changelog(repopath, latest_rel=None): def main(args): """ Main method. """ - repopath = args.worktree_path + repopath = args.worktree_path.rstrip(os.path.sep) changelog = produce_changelog(repopath) _log.info("\n".join(changelog)) diff --git a/rpmautospec/process_distgit.py b/rpmautospec/process_distgit.py index 3298238..7f142c1 100644 --- a/rpmautospec/process_distgit.py +++ b/rpmautospec/process_distgit.py @@ -178,7 +178,7 @@ def process_distgit(srcdir, dist, session, actions=None): def main(args): """ Main method. """ - repopath = args.worktree_path + repopath = args.worktree_path.rstrip(os.path.sep) dist = args.dist kojiclient = koji_init(args.koji_url)