# vi: encoding=utf-8 ts=8 sts=4 sw=4 et import os, sys, config def fileexists(path): if path[0]=='/': fullpath=path else: fullpath=config.ftp_dir+path return os.path.exists(fullpath) def checkdir(dir): if not fileexists(sys.argv[1]): print config.value['ftp_dir']+'/'+sys.argv[1] + " does not exist" sys.exit(1) if 'HOME' in os.environ: ftpadmdir=os.environ['HOME']+'/pld-ftp-admin/' else: ftpadmdir='../' noarchcachedir=ftpadmdir+'var/noarch-cache/' tmpdir=ftpadmdir+'var/tmp/'