Explorar el Código

Actually write out the files

Yentl Van Tendeloo hace 7 años
padre
commit
58951723f9
Se han modificado 1 ficheros con 2 adiciones y 4 borrados
  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())