From: Jan Rękorajski Date: Sat, 16 Jan 2021 19:50:13 +0000 (+0100) Subject: Use python3 compatible string methods X-Git-Url: https://git.pld-linux.org/?p=projects%2Fpld-ftp-admin.git;a=commitdiff_plain;h=6c80993a7383e5d7e61a27d16bbad17273632a92 Use python3 compatible string methods --- 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()