Skip to content

Commit a28067a

Browse files
author
Dario Berzano
committed
Fixed a bug in variables substitution
1 parent 5bb7129 commit a28067a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

elastiq/__init__.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -709,7 +709,7 @@ def main(argv):
709709
# %ipv4%, %ipv6%, %fqdn%
710710
# Can be overridden by the [substitute] section in configuration
711711

712-
if user_data.find('%ipv4%'):
712+
if user_data.find('%ipv4%') > -1:
713713
ipv4 = cf['substitute']['ipv4']
714714
if ipv4 is None:
715715
ipv4 = get_main_ipv4()
@@ -718,7 +718,7 @@ def main(argv):
718718
else:
719719
user_data = user_data.replace('%ipv4%', ipv4)
720720

721-
if user_data.find('%ipv6%'):
721+
if user_data.find('%ipv6%') > -1:
722722
ipv6 = cf['substitute']['ipv6']
723723
if ipv6 is None:
724724
ipv6 = get_main_ipv6()
@@ -727,7 +727,7 @@ def main(argv):
727727
else:
728728
user_data = user_data.replace('%ipv6%', ipv6)
729729

730-
if user_data.find('%fqdn%'):
730+
if user_data.find('%fqdn%') > -1:
731731
fqdn = cf['substitute']['fqdn']
732732
if fqdn is None:
733733
fqdn = socket.getfqdn()

0 commit comments

Comments
 (0)