adding untracked files

This commit is contained in:
Senad Uka
2016-01-24 09:15:14 +01:00
parent 85d41bc69b
commit f7061ab3da
8 changed files with 180 additions and 0 deletions

View File

@@ -0,0 +1,19 @@
def sync():
server = Server(API_BASE_URL, CONTROLLER_ID)
local = File(STATE_FILE)
server_state = server.get_state()
if local.present():
local.load()
else:
local.data = server_state
local.save()
local_state = local.data
changer = Changer(local_state, remote_state)
current_state = changer.process_change()
server.post_state(current_state)