瀏覽代碼

Actually write out the files

Yentl Van Tendeloo 7 年之前
父節點
當前提交
58951723f9
共有 1 個文件被更改,包括 2 次插入4 次删除
  1. 2 4
      services/files/main.py

+ 2 - 4
services/files/main.py

@@ -13,10 +13,8 @@ def file_service(port):
     filename = service_get(port)
     content = service_get(port)
     try:
-        #with open(filename, 'w') as f:
-        #    f.write(content)
-        print("WOULD WRITE TO FILE " + str(filename))
-        print("CONTENT: " + str(content))
+        with open(filename, 'w') as f:
+            f.write(content)
         service_set(port, "Success")
     except:
         service_set(port, "Failure: " + traceback.format_exc())