[Blends-commit] [SCM] website branch, master, updated. 323edf96a28170fcd7a26ba0478866fe2f7626cd

Andreas Tille tille at debian.org
Thu Sep 19 13:46:22 UTC 2013


The following commit has been merged in the master branch:
commit 323edf96a28170fcd7a26ba0478866fe2f7626cd
Author: Andreas Tille <tille at debian.org>
Date:   Thu Sep 19 15:50:02 2013 +0200

    Set proper group and permission for output also in thermometer and new bugs code (old bugs code should not be called anyway)

diff --git a/webtools/bugs_udd.py b/webtools/bugs_udd.py
index 5fe3bbd..8656b54 100755
--- a/webtools/bugs_udd.py
+++ b/webtools/bugs_udd.py
@@ -23,7 +23,7 @@ from genshi import Markup
 from genshi.template.eval import UndefinedError
 
 from blendsunicode   import to_unicode
-from blendstasktools import ReadConfig, RowDictionaries, CheckOrCreateOutputDir
+from blendstasktools import ReadConfig, RowDictionaries, CheckOrCreateOutputDir, SetFilePermissions
 from blendsmarkdown  import MarkupString
 
 ###########################################################################################
@@ -369,6 +369,7 @@ the right shows the tasks of %s.""" ) \
         print >>f
     print >>f, json.dumps(bugs_data)
     f.close()
+    SetFilePermissions(blendname+'_bugs.json')
 
     nbugs           = {}
     ndone           = {}
@@ -454,9 +455,11 @@ the right shows the tasks of %s.""" ) \
             fd = open('debug_'+blendname+'_bugs.json', 'w')
             print >>fd, json.dumps(bugs_data[task])
             fd.close()
+            SetFilePermissions(outputdir + '/' + task + '.html')
             print err
     
     	f.close()
+        SetFilePermissions(outputdir + '/' + task + '.html')
     
     template = loader.load('bugs_idx_udd.xhtml')
     outputfile = outputdir + '/index.html'
@@ -467,6 +470,7 @@ the right shows the tasks of %s.""" ) \
     f = open(outputfile, 'w')
     print >> f, template.generate(**data).render('xhtml')
     f.close()
+    SetFilePermissions(outputfile)
 
 if __name__ == '__main__':
     main()
diff --git a/webtools/thermometer.py b/webtools/thermometer.py
index ccbeb20..4069844 100755
--- a/webtools/thermometer.py
+++ b/webtools/thermometer.py
@@ -22,7 +22,7 @@ from genshi import Markup
 from genshi.template.eval import UndefinedError
 
 from blendsunicode   import to_unicode
-from blendstasktools import ReadConfig, RowDictionaries, CheckOrCreateOutputDir
+from blendstasktools import ReadConfig, RowDictionaries, CheckOrCreateOutputDir, SetFilePermissions
 
 ###########################################################################################
 # Define several prepared statements to query UDD
@@ -281,6 +281,7 @@ def main():
         #f = open(blendname+'_thermometer.json', 'w')
         #print >>f, json.dumps(blend_data)
         #f.close()
+        #SetFilePermissions(blendname+'_thermometer.json')
     else:
         print >>stderr, "No data received for Blend", blendname
         exit(1)
@@ -353,10 +354,12 @@ the right shows the tasks of %s.""" ) \
     template = loader.load('thermometer.xhtml')
     print >> f, template.generate(**data).render('xhtml')
     f.close()
+    SetFilePermissions(outputfile)
     f = open(uoutputfile, 'w')
     utemplate = loader.load('uthermometer.xhtml')
     print >> f, utemplate.generate(**data).render('xhtml')
     f.close()
+    SetFilePermissions(uoutputfile)
 
 if __name__ == '__main__':
     main()

-- 
Static and dynamic websites for Debian Pure Blends



More information about the Blends-commit mailing list