summaryrefslogtreecommitdiff
path: root/yarns/lib.py
diff options
context:
space:
mode:
authorLars Wirzenius <liw@exolobe1>2018-05-13 15:30:23 +0300
committerLars Wirzenius <liw@liw.fi>2018-05-17 21:44:59 +0300
commitb11d31ef23c5dfee6bfa54afbec47fc8b8bab7b1 (patch)
tree2e6b085f8fb023d53c8ac20a97aef2c7d1c11d4b /yarns/lib.py
parent531dd2c50bfdfcf50bb37f57cf9fc2b69787adcf (diff)
downloadick2-b11d31ef23c5dfee6bfa54afbec47fc8b8bab7b1.tar.gz
Change: how controller stores persistent data
Replace old State class with new FilePersistentState and TransactionalState classes. Use new Resource class instead of raw dicts. Use context managers for creating, updating resources, to avoid mistakes from accidentally not saving changes. Overall persistence should now be rather simpler. This should open up a possibility for changing the controller to insert more actions into the build graph, to trigger notifcations via the workers.
Diffstat (limited to 'yarns/lib.py')
-rw-r--r--yarns/lib.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/yarns/lib.py b/yarns/lib.py
index d57e11f..f3ac9d9 100644
--- a/yarns/lib.py
+++ b/yarns/lib.py
@@ -22,6 +22,7 @@ import random
import socket
import sys
import time
+import urllib
import cliapp
import requests
@@ -225,4 +226,4 @@ def list_diff(a, b):
def encode_basename(basename):
- return base64.urlsafe_b64encode(basename.encode()).decode('ascii')
+ return urllib.quote(basename, safe='')