# 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) pldftpadmdir=os.environ['HOME']+'/pld-ftp-admin/' noarchcachedir=pldftpadmdir+'var/noarch-cache/' tmpdir=pldftpadmdir+'var/tmp'