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

Ole Streicher ole at aip.de
Fri Mar 4 13:02:47 UTC 2016


The following commit has been merged in the master branch:
commit cdd35b2af0ac0df1a508db8a73f097b50afe8e98
Author: Ole Streicher <ole at aip.de>
Date:   Fri Mar 4 11:36:55 2016 +0100

    Create a file "tasks.json" in the tasks directory.
    This file contains the tasks data in raw form, as coming
    from the blendstasktools. This is useful for debugging.

diff --git a/webtools/tasks.py b/webtools/tasks.py
index d312366..7d0c34e 100755
--- a/webtools/tasks.py
+++ b/webtools/tasks.py
@@ -5,6 +5,7 @@ import apt_pkg
 import apt_inst
 import codecs
 
+import json
 from sys import argv, exit, stderr
 import os
 import re
@@ -72,6 +73,14 @@ outputdir = CheckOrCreateOutputDir(tasks.data['outputdir'],'tasks')
 if outputdir == None:
 	exit(-1)
 
+class DefaultEncoder(json.JSONEncoder):
+        def default(self, obj):
+                return obj.__dict__
+
+with open(os.path.join(outputdir, 'tasks.json'), 'w') as fp:
+        json.dump(data, fp, indent=4, sort_keys = True, cls=DefaultEncoder)
+        fp.flush()
+
 t = datetime.now()
 htaccess = outputdir + '/.htaccess'
 try:

-- 
Static and dynamic websites for Debian Pure Blends



More information about the Blends-commit mailing list