]> git.pld-linux.org Git - projects/pld-ftp-admin.git/commitdiff
Use python3 compatible string methods
authorJan Rękorajski <baggins@pld-linux.org>
Sat, 16 Jan 2021 19:50:13 +0000 (20:50 +0100)
committerJan Rękorajski <baggins@pld-linux.org>
Sat, 16 Jan 2021 19:50:13 +0000 (20:50 +0100)
modules/config.py

index 0836555306566749e2534ec87de9ff363c2b1e54..cab0594b267a4b2de9376e416bdc719923393e24 100644 (file)
@@ -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()
 
This page took 0.087961 seconds and 4 git commands to generate.