]> git.pld-linux.org Git - projects/pld-ftp-admin.git/blobdiff - modules/common.py
- signpkg: allow signing whole tree if no pkgname given
[projects/pld-ftp-admin.git] / modules / common.py
index 87162df5e00948117c8bf2f6912cfe9278d84045..19f3aa8949e3c09076ec72d554ec46f763b6dd5d 100644 (file)
@@ -3,21 +3,24 @@
 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(sys.argv[1]):
-        print config.value['ftp_dir']+'/'+sys.argv[1] + " does not exist"
+    if not fileexists(dir):
+        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/'
This page took 0.148137 seconds and 4 git commands to generate.