import os, sys, config
def fileexists(path):
- if path[0]=='/':
- fullpath=path
+ if path[0] == '/':
+ fullpath = path
else:
- fullpath=config.ftp_dir+path
+ fullpath = config.ftp_dir + path
return os.path.exists(fullpath)
def checkdir(dir):
if not fileexists(dir):
- print 'ERR: ' + config.value['ftp_dir']+'/' + dir + " does not exist"
+ print >>sys.stderr, 'ERR: ' + config.value['ftp_dir']+'/' + dir + " does not exist"
sys.exit(1)
if 'HOME' in os.environ:
- ftpadmdir=os.environ['HOME']+'/pld-ftp-admin/'
+ ftpadmdir = os.environ['HOME'] + '/pld-ftp-admin'
else:
- ftpadmdir='../'
-noarchcachedir=ftpadmdir+'var/noarch-cache/'
-tmpdir=ftpadmdir+'var/tmp/'
+ ftpadmdir = '..'
+# noarchcachedir is dir where noarch files contents are stored for AI
+# XXX: file reference where the AI resides
+noarchcachedir = ftpadmdir + '/var/noarch-cache/'
+
+tmpdir = ftpadmdir + '/var/tmp/'