[sysadmin-bin] rstrip actually matches all the chars you pass as function arguments (it doesn't stop at the first m



commit 32745c4c024fa4516e80ae163ac29686c6532009
Author: Andrea Veri <averi redhat com>
Date:   Wed May 30 12:02:37 2018 +0200

    rstrip actually matches all the chars you pass as function arguments (it doesn't stop at the first match)

 git/build-repo-list | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/git/build-repo-list b/git/build-repo-list
index 1f6855f..e2e151c 100755
--- a/git/build-repo-list
+++ b/git/build-repo-list
@@ -52,7 +52,7 @@ class Repo:
         self.pending = os.path.isfile(os.path.join(repopath, 'pending'))
         self.owner = ''
 
-        shortname = repopath.split('/')[-1].rstrip('.git')
+        shortname = repopath.split('/')[-1].split('.')[0]
         self.shortname = shortname
 
         pending = ''


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]