[med-svn] r1659 - trunk/community/infrastructure/scripts

tille at alioth.debian.org tille at alioth.debian.org
Tue Mar 25 09:23:07 UTC 2008


Author: tille
Date: 2008-03-25 09:23:07 +0000 (Tue, 25 Mar 2008)
New Revision: 1659

Modified:
   trunk/community/infrastructure/scripts/update-tasks
Log:
Do not try to chmod other people's files


Modified: trunk/community/infrastructure/scripts/update-tasks
===================================================================
--- trunk/community/infrastructure/scripts/update-tasks	2008-03-25 07:30:25 UTC (rev 1658)
+++ trunk/community/infrastructure/scripts/update-tasks	2008-03-25 09:23:07 UTC (rev 1659)
@@ -228,7 +228,11 @@
 
 f.write(tmpl.render(tasks))
 f.close()
-chmod(outputfile,S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH)
+try:
+	chmod(outputfile,S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH)
+except:
+	# chmod is not allowed to other peoples files
+	pass
 
 # Let's render single pages now.
 f = open("%s/htdocs/tasks.tmpl" % base)
@@ -244,4 +248,8 @@
 	f.write(re.sub(r"<br /><br />[ ]*</td>", "</td>", source))
 
 	f.close()
-	chmod(outputfile,S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH)
+	try:
+		chmod(outputfile,S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH)
+	except:
+		# chmod is not allowed to other peoples files
+		pass




More information about the debian-med-commit mailing list