[projects/pld-ftp-admin] Use python3 compatible string methods

baggins baggins at pld-linux.org
Sat Jan 16 20:50:45 CET 2021


commit 6c80993a7383e5d7e61a27d16bbad17273632a92
Author: Jan Rękorajski <baggins at pld-linux.org>
Date:   Sat Jan 16 20:50:13 2021 +0100

    Use python3 compatible string methods

 modules/config.py | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/modules/config.py b/modules/config.py
index 0836555..cab0594 100644
--- a/modules/config.py
+++ b/modules/config.py
@@ -12,13 +12,13 @@ else:
 f = open(path + '/.ftpadmrc', 'r')
 
 for line in f.readlines():
-    if line[0] == '#' or string.find(line, '=') == -1:
+    if line[0] == '#' or str.find(line, '=') == -1:
         continue
-    tuple = string.split(string.strip(line), '=')
+    tuple = str.split(str.strip(line), '=')
     if tuple[1][0] == '"':
-        value[string.strip(tuple[0])] = tuple[1][1:-1]
+        value[str.strip(tuple[0])] = tuple[1][1:-1]
     else:
-        value[string.strip(tuple[0])] = string.strip(tuple[1])
+        value[str.strip(tuple[0])] = str.strip(tuple[1])
 
 f.close()
 
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/projects/pld-ftp-admin.git/commitdiff/6c80993a7383e5d7e61a27d16bbad17273632a92



More information about the pld-cvs-commit mailing list