Merge pull request #3 from hemna/master

Added password, callsign and host
This commit is contained in:
Craig Lamparter 2018-11-21 13:04:58 -08:00 committed by GitHub
commit 126a718318
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 29 additions and 1 deletions

View File

@ -70,14 +70,42 @@ parser.add_argument("--user",
help="The callsign of this ARPS client with SSID"
" Default=env[APRS_USER]")
parser.add_argument("--host",
metavar="<host>",
default=utils.env("APRS_HOST"),
help="The aprs host to use Default=env[APRS_HOST]")
parser.add_argument("--password",
metavar="<password>",
default=utils.env("APRS_PASSWORD"),
help="The aprs password Default=env[APRS_PASSWORD]")
parser.add_argument("--callsign",
metavar="<callsign>",
default=utils.env("APRS_CALLSIGN"),
help="The callsign of radio in the field to which we send "
"email Default=env[APRS_CALLSIGN]")
args = parser.parse_args()
if not args.user:
print("Missing the aprs user")
print("Missing the aprs user (env[APRS_USER])")
parser.print_help()
parser.exit()
else:
USER = args.user
if not args.password:
print("Missing the aprs password (env[APRS_PASSWORD])")
parser.print_help()
parser.exit()
else:
PASS = args.password
if not args.callsign:
print("Missing the aprs callsign (env[APRS_CALLSIGN])")
parser.print_help()
parser.exit()
else:
BASECALLSIGN = args.callsign
try:
tn = telnetlib.Telnet(HOST, 14580)