File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff 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 ()
You can’t perform that action at this time.
0 commit comments