sanitize empty comment

This commit is contained in:
Ed Sandor 2020-12-12 11:08:47 -07:00
parent 4c3d037e58
commit 3435052e27

View File

@ -62,6 +62,8 @@ IGLOGIN {callsign} {password}
if((len(comment) > 0) and ((comment[0] != '"') or (comment[len(comment)-1] != '"'))): if((len(comment) > 0) and ((comment[0] != '"') or (comment[len(comment)-1] != '"'))):
comment = "\"" + comment + "\"" comment = "\"" + comment + "\""
else if(len(comment) > 0):
comment = "\"\""
pbeacon= "PBEACON sendto=IG delay=0:30 every=60:00 symbol={symbol} lat={lat} long={lon} POWER={power} {height} {gain} {adir} {freq} {tone} {offset} comment={comment}".format( pbeacon= "PBEACON sendto=IG delay=0:30 every=60:00 symbol={symbol} lat={lat} long={lon} POWER={power} {height} {gain} {adir} {freq} {tone} {offset} comment={comment}".format(
symbol=symbol, lat=lat, lon=lon, power=power, height=height, gain=gain, adir=adir, freq=freq, tone=tone, offset=offset, comment=comment ) symbol=symbol, lat=lat, lon=lon, power=power, height=height, gain=gain, adir=adir, freq=freq, tone=tone, offset=offset, comment=comment )