]> 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 d36242b54e87cf36ab94ac1333fb5063e748b20f..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(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/'
This page took 0.035915 seconds and 4 git commands to generate.