[projects/pld-ftp-admin] More python3 compatible string methods
baggins
baggins at pld-linux.org
Sun Jan 17 11:46:38 CET 2021
commit cea52869b4ed42994011f46f094651278e511be9
Author: Jan Rękorajski <baggins at pld-linux.org>
Date: Sun Jan 17 11:40:00 2021 +0100
More python3 compatible string methods
modules/baseftptree.py | 2 +-
modules/ftptree.py | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/modules/baseftptree.py b/modules/baseftptree.py
index af47c76..64f81a4 100644
--- a/modules/baseftptree.py
+++ b/modules/baseftptree.py
@@ -31,7 +31,7 @@ class BasePkg:
f.close()
for entry in lines:
- i=string.split(string.strip(entry), ':')
+ i=str.split(str.strip(entry), ':')
if i[0] == 'info':
if len(i)==3:
self.info[i[1]]=i[2]
diff --git a/modules/ftptree.py b/modules/ftptree.py
index 0200a10..c45c131 100644
--- a/modules/ftptree.py
+++ b/modules/ftptree.py
@@ -71,7 +71,7 @@ def mv(src, dst, test = False):
class Pkg(BasePkg):
def __init__(self, nvr, tree):
BasePkg.__init__(self, nvr, tree)
- self.name = string.join(nvr.split('-')[:-2], '-')
+ self.name = '-'.join(nvr.split('-')[:-2])
self.version = nvr.split('-')[-2]
self.release = nvr.split('-')[-1]
self.marked4removal = False
@@ -158,7 +158,7 @@ class Pkg(BasePkg):
for bid in self.build.keys():
f.write("info:build:%s:requester:%s\ninfo:build:%s:requester_email:%s\n" % (bid, self.build[bid].requester, bid, self.build[bid].requester_email))
for key in self.info.keys():
- f.write("info:%s:%s\n" % (key, string.join(self.info[key], ':')))
+ f.write("info:%s:%s\n" % (key, ':'.join(self.info[key])))
for arch in self.files.keys():
for rpm in self.files[arch]:
f.write("file:%s:%s\n" % (arch, rpm))
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/projects/pld-ftp-admin.git/commitdiff/7aec4c36547d10c790a119a1ac203eee13755a6d
More information about the pld-cvs-commit
mailing list