summaryrefslogtreecommitdiff
path: root/subplot/server.py
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2021-01-03 11:59:16 +0000
committerLars Wirzenius <liw@liw.fi>2021-01-03 11:59:16 +0000
commitf2dcfc89cb5d8d22c8bdb5f1decdbdbf283d5056 (patch)
tree2cfb0b9e4dd69f93413d0e934e1113534d7352dc /subplot/server.py
parente6a4eb6edf83a68a6f73094126804beb0c569937 (diff)
parent543107a70eeffaa6932c87c02b43b0fd4f8558e5 (diff)
downloadobnam2-f2dcfc89cb5d8d22c8bdb5f1decdbdbf283d5056.tar.gz
Merge branch 'persisten' into 'main'
feat: load chunk metadata into index at startup See merge request larswirzenius/obnam!56
Diffstat (limited to 'subplot/server.py')
-rw-r--r--subplot/server.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/subplot/server.py b/subplot/server.py
index dca7f10..5cc9d9b 100644
--- a/subplot/server.py
+++ b/subplot/server.py
@@ -24,7 +24,8 @@ def start_chunk_server(ctx):
shutil.copy(os.path.join(srcdir, x), x)
chunks = "chunks"
- os.mkdir(chunks)
+ if not os.path.exists(chunks):
+ os.mkdir(chunks)
port = random.randint(2000, 30000)
ctx["config"] = config = {