[Debconf-video-commits] r714 - in package/trunk: debian src

Ben Hutchings benh at alioth.debian.org
Fri Jul 29 11:22:12 UTC 2011


Author: benh
Date: 2011-07-29 11:22:11 +0000 (Fri, 29 Jul 2011)
New Revision: 714

Modified:
   package/trunk/debian/changelog
   package/trunk/src/dc-publish
Log:
Abort dc-publish if rsync fails

Modified: package/trunk/debian/changelog
===================================================================
--- package/trunk/debian/changelog	2011-07-29 11:21:38 UTC (rev 713)
+++ package/trunk/debian/changelog	2011-07-29 11:22:11 UTC (rev 714)
@@ -1,6 +1,7 @@
 debconf-video (20110729.1) UNRELEASED; urgency=low
 
   * Update dc-publish script for new database schema
+  * Abort dc-publish if rsync fails
 
  -- Ben Hutchings <ben at decadent.org.uk>  Fri, 29 Jul 2011 13:20:49 +0200
 

Modified: package/trunk/src/dc-publish
===================================================================
--- package/trunk/src/dc-publish	2011-07-29 11:21:38 UTC (rev 713)
+++ package/trunk/src/dc-publish	2011-07-29 11:22:11 UTC (rev 714)
@@ -120,10 +120,11 @@
 
 def publish(config, file_names):
     os.chdir(config['FILE_BASE'])
-    os.spawnvp(os.P_WAIT, 'rsync',
-               ['rsync', '--relative', '--partial', '--times', '-e ssh', '-vvv', '--bwlimit=307']
-               + file_names
-               + [config['PUBLICATION_PATH']])
+    if os.spawnvp(os.P_WAIT, 'rsync',
+                  ['rsync', '--relative', '--partial', '--times', '-e ssh', '-vvv', '--bwlimit=307']
+                  + file_names
+                  + [config['PUBLICATION_PATH']]) not in [0, None]:
+        raise EnvironmentError('rsync failed')
 
 def main():
     cur = database.get_cursor()




More information about the Debconf-video-commits mailing list