1
0
mirror of https://github.com/craigerl/aprsd.git synced 2025-06-17 05:42:36 -04:00

Merge pull request #1 from hemna/master

Added standard python main()
This commit is contained in:
Craig Lamparter 2018-11-21 11:58:56 -08:00 committed by GitHub
commit 26ca8563f9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -323,6 +323,7 @@ def send_email(to_addr, content):
### main() ### ### main() ###
def main():
try: try:
tn = telnetlib.Telnet(HOST, 14580) tn = telnetlib.Telnet(HOST, 14580)
except Exception, e: except Exception, e:
@ -464,7 +465,6 @@ while True:
reply = "Unable to find you (send beacon?)" reply = "Unable to find you (send beacon?)"
send_message(fromcall, reply) send_message(fromcall, reply)
# USAGE # USAGE
else: else:
reply = "usage: time, fortune, loc, weath, -emailaddr emailbody, -#(resend)" reply = "usage: time, fortune, loc, weath, -emailaddr emailbody, -#(resend)"
@ -481,7 +481,9 @@ while True:
os._exit(1) os._exit(1)
# end while True # end while True
tn.close() tn.close()
exit() exit()
if __name__ == "__main__":
main()