]> TLD Linux GIT Repositories - tld-ftp-admin.git/blobdiff - modules/config.py
- non-integer releases are ok in TLD
[tld-ftp-admin.git] / modules / config.py
index ee32dfac8bdc58c4bc3ad333b92a111f775d6527..9153916d77dc852b238846f3d20866329eb2889a 100644 (file)
@@ -4,7 +4,7 @@ import string, os
 
 value = {}
 
-if os.environ.has_key('HOME'):
+if 'HOME' in os.environ:
     path = os.environ['HOME']
 else:
     path = '../../' # cgi-bin interface
@@ -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()
 
@@ -73,4 +73,4 @@ else:
 if 'ftp_dist' in value:
     ftp_dist = value['ftp_dist']
 else:
-    ftp_dist = 'pld'
+    ftp_dist = 'tld'