From f301d8d2e95bcdc5efc1a4a2345402162cfb03d4 Mon Sep 17 00:00:00 2001 From: Dan Srebnick Date: Sun, 28 Jan 2018 12:48:38 -0500 Subject: [PATCH] Fix issue #1 BEACON EXEC abnormal close messages in aprx.log --- noaacap/DEBIAN/control | 2 +- noaacap/DEBIAN/copyright | 2 +- noaacap/usr/local/bin/noaacap.py | 9 ++++++++- noaacap/usr/local/share/noaacap/CHANGELOG | 4 ++++ noaacap/usr/local/share/noaacap/LICENSE | 2 +- 5 files changed, 15 insertions(+), 4 deletions(-) diff --git a/noaacap/DEBIAN/control b/noaacap/DEBIAN/control index 3e6686d..0abe274 100644 --- a/noaacap/DEBIAN/control +++ b/noaacap/DEBIAN/control @@ -1,5 +1,5 @@ Package: noaacap -Version: 0.7.3 +Version: 0.8 Section: hamradio Priority: extra Maintainer: Dan Srebnick diff --git a/noaacap/DEBIAN/copyright b/noaacap/DEBIAN/copyright index 450efac..3d6a7ad 100644 --- a/noaacap/DEBIAN/copyright +++ b/noaacap/DEBIAN/copyright @@ -1,3 +1,3 @@ -Copyright: 2017 Daniel L. Srebnick +Copyright: 2017-2018 Daniel L. Srebnick License: BSD-2-clause Files: * diff --git a/noaacap/usr/local/bin/noaacap.py b/noaacap/usr/local/bin/noaacap.py index 5709830..95964d1 100755 --- a/noaacap/usr/local/bin/noaacap.py +++ b/noaacap/usr/local/bin/noaacap.py @@ -6,7 +6,7 @@ ## ## See /usr/local/share/noaacap/CHANGELOG for change history ## -version = "0.7" +version = "0.8" import sys import pytz @@ -249,6 +249,13 @@ for i in range(0, count): if parms[j].valueName.string == 'UGC': zcs = parms[j].value.string + # This handles expired messages found to contain no UGC + try: + zcs + except: + log.debug('No zcs in message') + continue + type = pp[bytes(Phenomena, 'utf-8')].decode('utf-8') if Action == "CAN": diff --git a/noaacap/usr/local/share/noaacap/CHANGELOG b/noaacap/usr/local/share/noaacap/CHANGELOG index 04b4a03..3e54d50 100644 --- a/noaacap/usr/local/share/noaacap/CHANGELOG +++ b/noaacap/usr/local/share/noaacap/CHANGELOG @@ -1,5 +1,9 @@ noaacap changelog ## +Version: 0.8 +Not Released Yet +Fix alerts without UGC causing BEACON EXEC abnormal close +## Version: 0.7 Release: September 28, 2017 Added myResend parameter to control message resends. diff --git a/noaacap/usr/local/share/noaacap/LICENSE b/noaacap/usr/local/share/noaacap/LICENSE index 5d0ba09..0691f86 100644 --- a/noaacap/usr/local/share/noaacap/LICENSE +++ b/noaacap/usr/local/share/noaacap/LICENSE @@ -1,6 +1,6 @@ BSD 2-Clause License -Copyright (c) 2017, Daniel L. Srebnick +Copyright (c) 2017-2018, Daniel L. Srebnick All rights reserved. Redistribution and use in source and binary forms, with or without