浏览代码

DC - Minor update

Steve L. Nyemba 7 年之前
父节点
当前提交
64a69b8156
共有 2 个文件被更改,包括 6 次插入7 次删除
  1. 1 6
      config.json
  2. 5 1
      src/data-collector.py

+ 1 - 6
config.json

@@ -1,6 +1 @@
-{
-	"key":"nyemba@gmail.com",
-	"id":"maori",
-	"apps":"chrome,preview,itunes",
-	"folders":"/Users/steve/tmp"
-}
+05d1c53b-e464-486c-9272-e351836e7a97

+ 5 - 1
src/data-collector.py

@@ -33,7 +33,11 @@ class Collector(Thread) :
 		for id in ['apps','folders']:
 			if id in SYS_ARGS :
 				SYS_ARGS[id] = SYS_ARGS[id].split(',')
-		
+		#
+		# Let's open the file with the key (nothing else should be in the file
+		f = open(SYS_ARGS['key'])
+		SYS_ARGS['key'] = f.read()
+		f.close()
 		
 		headers = {"key":SYS_ARGS["key"],"id":SYS_ARGS["id"]} #,"scope":json.dumps(scope)}
 		headers['content-type'] = 'application/json'