diff options
author | rexxnor <rexxnor+gnunet@brief.li> | 2019-05-09 16:23:17 +0200 |
---|---|---|
committer | rexxnor <rexxnor+gnunet@brief.li> | 2019-05-09 16:23:17 +0200 |
commit | c5616a8283fb7e919c90c24c94bdd9113b80bbc4 (patch) | |
tree | 51e0dc9dcef46917d275148c2d19a7b1f543d362 /ascension | |
parent | 523342ba45f078b64a4d10badb7df4e51f5145c1 (diff) | |
download | ascension-c5616a8283fb7e919c90c24c94bdd9113b80bbc4.tar.gz ascension-c5616a8283fb7e919c90c24c94bdd9113b80bbc4.zip |
added searching for zone if it already exists
Diffstat (limited to 'ascension')
-rw-r--r-- | ascension/ascension.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/ascension/ascension.py b/ascension/ascension.py index 63b2680..5a22d4d 100644 --- a/ascension/ascension.py +++ b/ascension/ascension.py | |||
@@ -593,8 +593,9 @@ class Ascender(): | |||
593 | stdout=sp.PIPE, | 593 | stdout=sp.PIPE, |
594 | stderr=sp.DEVNULL) | 594 | stderr=sp.DEVNULL) |
595 | logging.info("executed command: %s", " ".join(ret.args)) | 595 | logging.info("executed command: %s", " ".join(ret.args)) |
596 | pkey_zone = ret.stdout.decode().strip() | ||
597 | except sp.CalledProcessError: | 596 | except sp.CalledProcessError: |
597 | output = ret.stdout.decode().strip() | ||
598 | pkey_zone = re.findall("^[\w\d]{52}$", output, re.M)[0] | ||
598 | logging.info("Zone %s already exists!", zonestring) | 599 | logging.info("Zone %s already exists!", zonestring) |
599 | return pkey_zone | 600 | return pkey_zone |
600 | 601 | ||