Browse Source

DC - Minor update

Steve L. Nyemba 7 năm trước cách đây
mục cha
commit
64a69b8156
2 tập tin đã thay đổi với 6 bổ sung7 xóa
  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'