diff options
author | Jan Rękorajski | 2021-01-16 19:50:13 (GMT) |
---|---|---|
committer | Jan Rękorajski | 2021-01-16 19:50:13 (GMT) |
commit | 6c80993a7383e5d7e61a27d16bbad17273632a92 (patch) | |
tree | 69c0a062b4c41b59b4d94cde2dd7d5beaad5869c | |
parent | ff13be59b0001e675b62edacae7614e9f0762985 (diff) | |
download | pld-ftp-admin-6c80993a7383e5d7e61a27d16bbad17273632a92.zip pld-ftp-admin-6c80993a7383e5d7e61a27d16bbad17273632a92.tar.gz |
Use python3 compatible string methods
-rw-r--r-- | modules/config.py | 8 |
1 files 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() |