commit c5616a8283fb7e919c90c24c94bdd9113b80bbc4
parent 523342ba45f078b64a4d10badb7df4e51f5145c1
Author: rexxnor <rexxnor+gnunet@brief.li>
Date: Thu, 9 May 2019 16:23:17 +0200
added searching for zone if it already exists
Diffstat:
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/ascension/ascension.py b/ascension/ascension.py
@@ -593,8 +593,9 @@ class Ascender():
stdout=sp.PIPE,
stderr=sp.DEVNULL)
logging.info("executed command: %s", " ".join(ret.args))
- pkey_zone = ret.stdout.decode().strip()
except sp.CalledProcessError:
+ output = ret.stdout.decode().strip()
+ pkey_zone = re.findall("^[\w\d]{52}$", output, re.M)[0]
logging.info("Zone %s already exists!", zonestring)
return pkey_zone