[sysadmin-bin] ftpadmin: really call signal-ftp-sync and remove json file before creating a new one



commit 5b4c60a26f0e8619d563f20f383250ef649cab0c
Author: Olav Vitters <olav vitters nl>
Date:   Sun Mar 27 14:06:31 2011 +0200

    ftpadmin: really call signal-ftp-sync and remove json file before creating a new one

 ftpadmin |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/ftpadmin b/ftpadmin
index 521b904..f155171 100755
--- a/ftpadmin
+++ b/ftpadmin
@@ -562,6 +562,9 @@ class DirectoryInfo(BasicInfo):
         return (relpath, realpath, human_size(stat.st_size), stat)
 
     def write_json(self):
+        # Want to overwrite any existing file and change the owner
+        if os.path.exists(self.jsonfile):
+            os.remove(self.jsonfile)
         with open(self.jsonfile, 'w') as f:
             json.dump((self.JSONVERSION, self._info, self._versions, self._ignored), f)
             if self.GROUPID is not None:
@@ -1075,7 +1078,7 @@ Install %s? [Y/n]""" % self.module,
             self._call_cmd(cmd)
 
         sys.stdout.write(" - Triggering ftp.gnome.org update")
-        syncscript = ['/usr/local/bin/signal-ftp-sync']
+        cmd = ['/usr/local/bin/signal-ftp-sync']
         if self._call_cmd(cmd):
             print """
 Your tarball will appear in the following location on ftp.gnome.org:



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]