summaryrefslogtreecommitdiffstats
path: root/krebs/5pkgs/simple/Reaktor/scripts
diff options
context:
space:
mode:
authorjeschli <jeschli@gmail.com>2018-09-25 19:56:06 +0200
committerjeschli <jeschli@gmail.com>2018-09-25 19:56:06 +0200
commit8834d1a9ff6eddfc36e3ad07b7f93805b3212b3f (patch)
tree9ce300976ec88d90e5c5c9030111d890dcf5683e /krebs/5pkgs/simple/Reaktor/scripts
parentf922d5947acc3151619ec06962197a800d3138eb (diff)
parenta374a452112ba962ab90e45b6b0f27b3a1330e4f (diff)
Merge remote-tracking branch 'origin/master'
Diffstat (limited to 'krebs/5pkgs/simple/Reaktor/scripts')
-rw-r--r--krebs/5pkgs/simple/Reaktor/scripts/sed-plugin.py12
1 files changed, 11 insertions, 1 deletions
diff --git a/krebs/5pkgs/simple/Reaktor/scripts/sed-plugin.py b/krebs/5pkgs/simple/Reaktor/scripts/sed-plugin.py
index 51ac7a071..ecb03917b 100644
--- a/krebs/5pkgs/simple/Reaktor/scripts/sed-plugin.py
+++ b/krebs/5pkgs/simple/Reaktor/scripts/sed-plugin.py
@@ -8,9 +8,19 @@ import shelve
from os import environ
from os.path import join
from sys import argv
+from time import sleep
import re
-d = shelve.open(join(environ['state_dir'], 'sed-plugin.shelve'), writeback=True)
+# try to open the shelve file until it succeeds
+while True:
+ try:
+ d = shelve.open(
+ join(environ['state_dir'], 'sed-plugin.shelve'),
+ writeback=True
+ )
+ break
+ except: # noqa: E722
+ sleep(0.2)
usr = environ['_from']