From 8d0cd71477a3dc28f4ea0b016c86c6a7e5dc9eed Mon Sep 17 00:00:00 2001 From: Jeffrey Phillips Freeman <jeffrey.freeman@syncleus.com> Date: Fri, 23 Sep 2016 11:04:48 -0400 Subject: [PATCH] Changed double quotes to single quotes throughout most of the application for consistency. Issue: #9 --- src/apex/__init__.py | 4 +-- src/apex/__main__.py | 6 ++-- src/apex/aprs/__init__.py | 4 +-- src/apex/aprs/aprs_internet_service.py | 8 ++--- src/apex/aprs/aprs_kiss.py | 6 ++-- src/apex/aprs/constants.py | 4 +-- src/apex/aprs/decimaldegrees.py | 4 +-- src/apex/aprs/util.py | 10 +++---- src/apex/cli.py | 8 ++--- src/apex/kiss/__init__.py | 4 +-- src/apex/kiss/constants.py | 4 +-- src/apex/kiss/kiss.py | 10 +++---- src/apex/kiss/util.py | 4 +-- src/apex/pluginloader.py | 12 ++++---- src/apex/plugins/apexparadigm/__init__.py | 36 +++++++++++------------ src/apex/plugins/beacon/__init__.py | 10 +++---- src/apex/plugins/id/__init__.py | 10 +++---- src/apex/plugins/status/__init__.py | 10 +++---- 18 files changed, 77 insertions(+), 77 deletions(-) diff --git a/src/apex/__init__.py b/src/apex/__init__.py index 73bb857..1177542 100644 --- a/src/apex/__init__.py +++ b/src/apex/__init__.py @@ -8,8 +8,8 @@ from __future__ import division from __future__ import print_function __author__ = 'Jeffrey Phillips Freeman (WI2ARD)' -__maintainer__ = "Jeffrey Phillips Freeman (WI2ARD)" -__email__ = "jeffrey.freeman@syncleus.com" +__maintainer__ = 'Jeffrey Phillips Freeman (WI2ARD)' +__email__ = 'jeffrey.freeman@syncleus.com' __license__ = 'Apache License, Version 2.0' __copyright__ = 'Copyright 2016, Syncleus, Inc. and contributors' __credits__ = [] diff --git a/src/apex/__main__.py b/src/apex/__main__.py index e045f83..c75b190 100644 --- a/src/apex/__main__.py +++ b/src/apex/__main__.py @@ -17,11 +17,11 @@ from __future__ import print_function from apex.cli import main __author__ = 'Jeffrey Phillips Freeman (WI2ARD)' -__maintainer__ = "Jeffrey Phillips Freeman (WI2ARD)" -__email__ = "jeffrey.freeman@syncleus.com" +__maintainer__ = 'Jeffrey Phillips Freeman (WI2ARD)' +__email__ = 'jeffrey.freeman@syncleus.com' __license__ = 'Apache License, Version 2.0' __copyright__ = 'Copyright 2016, Syncleus, Inc. and contributors' __credits__ = [] -if __name__ == "__main__": +if __name__ == '__main__': main(None) diff --git a/src/apex/aprs/__init__.py b/src/apex/aprs/__init__.py index 6f5cc39..ec82aa9 100644 --- a/src/apex/aprs/__init__.py +++ b/src/apex/aprs/__init__.py @@ -26,8 +26,8 @@ from .aprs_internet_service import AprsInternetService # noqa: F401 from .aprs_kiss import AprsKiss # noqa: F401 __author__ = 'Jeffrey Phillips Freeman (WI2ARD)' -__maintainer__ = "Jeffrey Phillips Freeman (WI2ARD)" -__email__ = "jeffrey.freeman@syncleus.com" +__maintainer__ = 'Jeffrey Phillips Freeman (WI2ARD)' +__email__ = 'jeffrey.freeman@syncleus.com' __license__ = 'Apache License, Version 2.0' __copyright__ = 'Copyright 2016, Syncleus, Inc. and contributors' __credits__ = [] diff --git a/src/apex/aprs/aprs_internet_service.py b/src/apex/aprs/aprs_internet_service.py index e9d2320..60dfca4 100644 --- a/src/apex/aprs/aprs_internet_service.py +++ b/src/apex/aprs/aprs_internet_service.py @@ -16,8 +16,8 @@ from apex.aprs import constants as aprsConstants from apex.aprs import util as aprsUtil __author__ = 'Jeffrey Phillips Freeman (WI2ARD)' -__maintainer__ = "Jeffrey Phillips Freeman (WI2ARD)" -__email__ = "jeffrey.freeman@syncleus.com" +__maintainer__ = 'Jeffrey Phillips Freeman (WI2ARD)' +__email__ = 'jeffrey.freeman@syncleus.com' __license__ = 'Apache License, Version 2.0' __copyright__ = 'Copyright 2016, Syncleus, Inc. and contributors' __credits__ = [] @@ -95,12 +95,12 @@ class AprsInternetService(object): message_sent = True return True elif 'HTTP' in protocol: - content = "\n".join([self._auth, aprsUtil.format_aprs_frame(frame)]) + content = '\n'.join([self._auth, aprsUtil.format_aprs_frame(frame)]) headers = headers or aprsConstants.APRSIS_HTTP_HEADERS result = requests.post(self._url, data=content, headers=headers) return 204 == result.status_code elif 'UDP' in protocol: - content = "\n".join([self._auth, aprsUtil.format_aprs_frame(frame)]) + content = '\n'.join([self._auth, aprsUtil.format_aprs_frame(frame)]) sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) sock.sendto( content, diff --git a/src/apex/aprs/aprs_kiss.py b/src/apex/aprs/aprs_kiss.py index a28a022..660effa 100644 --- a/src/apex/aprs/aprs_kiss.py +++ b/src/apex/aprs/aprs_kiss.py @@ -13,8 +13,8 @@ import logging import apex.kiss __author__ = 'Jeffrey Phillips Freeman (WI2ARD)' -__maintainer__ = "Jeffrey Phillips Freeman (WI2ARD)" -__email__ = "jeffrey.freeman@syncleus.com" +__maintainer__ = 'Jeffrey Phillips Freeman (WI2ARD)' +__email__ = 'jeffrey.freeman@syncleus.com' __license__ = 'Apache License, Version 2.0' __copyright__ = 'Copyright 2016, Syncleus, Inc. and contributors' __credits__ = [] @@ -47,7 +47,7 @@ class AprsKiss(apex.kiss.Kiss): # Less than 2 callsigns? if 1 < i < 11: if (raw_frame[raw_slice + 1] & 0x03 == 0x03 and raw_frame[raw_slice + 2] in [0xf0, 0xcf]): - frame['text'] = "".join(map(chr, raw_frame[raw_slice + 3:])) + frame['text'] = ''.join(map(chr, raw_frame[raw_slice + 3:])) frame['destination'] = AprsKiss.__identity_as_string(AprsKiss.__extract_callsign(raw_frame)) frame['source'] = AprsKiss.__identity_as_string(AprsKiss.__extract_callsign(raw_frame[7:])) frame['path'] = AprsKiss.__extract_path(int(i), raw_frame) diff --git a/src/apex/aprs/constants.py b/src/apex/aprs/constants.py index bc55538..a604310 100644 --- a/src/apex/aprs/constants.py +++ b/src/apex/aprs/constants.py @@ -13,8 +13,8 @@ from __future__ import print_function import logging __author__ = 'Jeffrey Phillips Freeman (WI2ARD)' -__maintainer__ = "Jeffrey Phillips Freeman (WI2ARD)" -__email__ = "jeffrey.freeman@syncleus.com" +__maintainer__ = 'Jeffrey Phillips Freeman (WI2ARD)' +__email__ = 'jeffrey.freeman@syncleus.com' __license__ = 'Apache License, Version 2.0' __copyright__ = 'Copyright 2016, Syncleus, Inc. and contributors' __credits__ = [] diff --git a/src/apex/aprs/decimaldegrees.py b/src/apex/aprs/decimaldegrees.py index 5abc5ca..a0f0035 100644 --- a/src/apex/aprs/decimaldegrees.py +++ b/src/apex/aprs/decimaldegrees.py @@ -58,8 +58,8 @@ import sys from decimal import Decimal as D __author__ = 'Jeffrey Phillips Freeman (WI2ARD)' -__maintainer__ = "Jeffrey Phillips Freeman (WI2ARD)" -__email__ = "jeffrey.freeman@syncleus.com" +__maintainer__ = 'Jeffrey Phillips Freeman (WI2ARD)' +__email__ = 'jeffrey.freeman@syncleus.com' __license__ = 'Apache License, Version 2.0' __copyright__ = 'Copyright 2016, Syncleus, Inc. and contributors' __credits__ = [] diff --git a/src/apex/aprs/util.py b/src/apex/aprs/util.py index 34df341..5334c09 100755 --- a/src/apex/aprs/util.py +++ b/src/apex/aprs/util.py @@ -15,8 +15,8 @@ import apex.aprs.decimaldegrees import apex.kiss.constants __author__ = 'Jeffrey Phillips Freeman (WI2ARD)' -__maintainer__ = "Jeffrey Phillips Freeman (WI2ARD)" -__email__ = "jeffrey.freeman@syncleus.com" +__maintainer__ = 'Jeffrey Phillips Freeman (WI2ARD)' +__email__ = 'jeffrey.freeman@syncleus.com' __license__ = 'Apache License, Version 2.0' __copyright__ = 'Copyright 2016, Syncleus, Inc. and contributors' __credits__ = [] @@ -44,7 +44,7 @@ def dec2dm_lat(dec): else: suffix = 'N' - retval = ''.join([str(abs_deg), "%.2f" % dec_min[1], suffix]) + retval = ''.join([str(abs_deg), '%.2f' % dec_min[1], suffix]) return retval @@ -69,7 +69,7 @@ def dec2dm_lng(dec): else: suffix = 'E' - retval = ''.join([str(abs_deg), "%.2f" % dec_min[1], suffix]) + retval = ''.join([str(abs_deg), '%.2f' % dec_min[1], suffix]) return retval @@ -190,7 +190,7 @@ def hash_frame(frame): """ hashing = 0 index = 0 - frame_string_prefix = frame['source'] + ">" + frame['destination'] + ":" + frame_string_prefix = frame['source'] + '>' + frame['destination'] + ':' for frame_chr in frame_string_prefix: hashing = ord(frame_chr) << (8*(index % 4)) ^ hashing index += 1 diff --git a/src/apex/cli.py b/src/apex/cli.py index 733c3b3..c5261c3 100644 --- a/src/apex/cli.py +++ b/src/apex/cli.py @@ -43,8 +43,8 @@ elif sys.version_info >= (3, 0): import configparser __author__ = 'Jeffrey Phillips Freeman (WI2ARD)' -__maintainer__ = "Jeffrey Phillips Freeman (WI2ARD)" -__email__ = "jeffrey.freeman@syncleus.com" +__maintainer__ = 'Jeffrey Phillips Freeman (WI2ARD)' +__email__ = 'jeffrey.freeman@syncleus.com' __license__ = 'Apache License, Version 2.0' __copyright__ = 'Copyright 2016, Syncleus, Inc. and contributors' __credits__ = [] @@ -54,7 +54,7 @@ def find_config(config_paths, verbose): config_file = 'apex.conf' rc_file = '.apexrc' cur_path = os.path.join(os.curdir, config_file) - home_path = os.path.join(os.path.expanduser("~"), rc_file) + home_path = os.path.join(os.path.expanduser('~'), rc_file) etc_path = os.path.join('etc', config_file) if config_paths is None: config_paths = [cur_path, home_path, etc_path] @@ -160,7 +160,7 @@ def main(verbose, configfile): plugin_loaders = getPlugins() if not len(plugin_loaders): click.echo(click.style('Warning: ', fg='yellow') + - click.style("No plugins were able to be discovered, will only display incoming messages.")) + click.style('No plugins were able to be discovered, will only display incoming messages.')) for plugin_loader in plugin_loaders: if verbose: click.echo('Plugin found at the following location: %s' % repr(plugin_loader)) diff --git a/src/apex/kiss/__init__.py b/src/apex/kiss/__init__.py index 4ced2d3..9db9ef0 100644 --- a/src/apex/kiss/__init__.py +++ b/src/apex/kiss/__init__.py @@ -24,8 +24,8 @@ import logging from .kiss import Kiss # noqa: F401 __author__ = 'Jeffrey Phillips Freeman (WI2ARD)' -__maintainer__ = "Jeffrey Phillips Freeman (WI2ARD)" -__email__ = "jeffrey.freeman@syncleus.com" +__maintainer__ = 'Jeffrey Phillips Freeman (WI2ARD)' +__email__ = 'jeffrey.freeman@syncleus.com' __license__ = 'Apache License, Version 2.0' __copyright__ = 'Copyright 2016, Syncleus, Inc. and contributors' __credits__ = [] diff --git a/src/apex/kiss/constants.py b/src/apex/kiss/constants.py index 9aab5ac..35e4fc5 100644 --- a/src/apex/kiss/constants.py +++ b/src/apex/kiss/constants.py @@ -11,8 +11,8 @@ from __future__ import print_function import logging __author__ = 'Jeffrey Phillips Freeman (WI2ARD)' -__maintainer__ = "Jeffrey Phillips Freeman (WI2ARD)" -__email__ = "jeffrey.freeman@syncleus.com" +__maintainer__ = 'Jeffrey Phillips Freeman (WI2ARD)' +__email__ = 'jeffrey.freeman@syncleus.com' __license__ = 'Apache License, Version 2.0' __copyright__ = 'Copyright 2016, Syncleus, Inc. and contributors' __credits__ = [] diff --git a/src/apex/kiss/kiss.py b/src/apex/kiss/kiss.py index 007d0b8..0b66c43 100644 --- a/src/apex/kiss/kiss.py +++ b/src/apex/kiss/kiss.py @@ -15,8 +15,8 @@ import serial from apex.kiss import constants as kissConstants __author__ = 'Jeffrey Phillips Freeman (WI2ARD)' -__maintainer__ = "Jeffrey Phillips Freeman (WI2ARD)" -__email__ = "jeffrey.freeman@syncleus.com" +__maintainer__ = 'Jeffrey Phillips Freeman (WI2ARD)' +__email__ = 'jeffrey.freeman@syncleus.com' __license__ = 'Apache License, Version 2.0' __copyright__ = 'Copyright 2016, Syncleus, Inc. and contributors' __credits__ = [] @@ -138,9 +138,9 @@ class Kiss(object): :return: An integer combining the two values into a single byte """ if port > 127 or port < 0: - raise Exception("port out of range") + raise Exception('port out of range') elif command_code > 127 or command_code < 0: - raise Exception("command_Code out of range") + raise Exception('command_Code out of range') return (port << 4) & command_code def start(self, mode_init=None, **kwargs): @@ -152,7 +152,7 @@ class Kiss(object): :param **kwargs: name/value pairs to use as initial config values. """ - self.logger.debug("kwargs=%s", kwargs) + self.logger.debug('kwargs=%s', kwargs) if 'tcp' in self.interface_mode: address = (self.host, self.tcp_port) diff --git a/src/apex/kiss/util.py b/src/apex/kiss/util.py index 60b764f..1873d9c 100644 --- a/src/apex/kiss/util.py +++ b/src/apex/kiss/util.py @@ -11,8 +11,8 @@ from __future__ import print_function import apex.kiss.constants __author__ = 'Jeffrey Phillips Freeman (WI2ARD)' -__maintainer__ = "Jeffrey Phillips Freeman (WI2ARD)" -__email__ = "jeffrey.freeman@syncleus.com" +__maintainer__ = 'Jeffrey Phillips Freeman (WI2ARD)' +__email__ = 'jeffrey.freeman@syncleus.com' __license__ = 'Apache License, Version 2.0' __copyright__ = 'Copyright 2016, Syncleus, Inc. and contributors' __credits__ = [] diff --git a/src/apex/pluginloader.py b/src/apex/pluginloader.py index 6f8eca2..4853a94 100644 --- a/src/apex/pluginloader.py +++ b/src/apex/pluginloader.py @@ -7,14 +7,14 @@ import importlib import os __author__ = 'Jeffrey Phillips Freeman (WI2ARD)' -__maintainer__ = "Jeffrey Phillips Freeman (WI2ARD)" -__email__ = "jeffrey.freeman@syncleus.com" +__maintainer__ = 'Jeffrey Phillips Freeman (WI2ARD)' +__email__ = 'jeffrey.freeman@syncleus.com' __license__ = 'Apache License, Version 2.0' __copyright__ = 'Copyright 2016, Syncleus, Inc. and contributors' __credits__ = [] -PluginFolder = "./plugins" -MainModule = "__init__" +PluginFolder = './plugins' +MainModule = '__init__' def getPlugins(): @@ -22,7 +22,7 @@ def getPlugins(): possibleplugins = os.listdir(PluginFolder) for i in possibleplugins: location = os.path.join(PluginFolder, i) - if not os.path.isdir(location) or not MainModule + ".py" in os.listdir(location): + if not os.path.isdir(location) or not MainModule + '.py' in os.listdir(location): continue plugins.append(i) @@ -30,4 +30,4 @@ def getPlugins(): def loadPlugin(plugin): - return importlib.import_module("plugins." + plugin) + return importlib.import_module('plugins.' + plugin) diff --git a/src/apex/plugins/apexparadigm/__init__.py b/src/apex/plugins/apexparadigm/__init__.py index 4981d33..2204929 100644 --- a/src/apex/plugins/apexparadigm/__init__.py +++ b/src/apex/plugins/apexparadigm/__init__.py @@ -10,8 +10,8 @@ import click import apex.aprs.util __author__ = 'Jeffrey Phillips Freeman (WI2ARD)' -__maintainer__ = "Jeffrey Phillips Freeman (WI2ARD)" -__email__ = "jeffrey.freeman@syncleus.com" +__maintainer__ = 'Jeffrey Phillips Freeman (WI2ARD)' +__email__ = 'jeffrey.freeman@syncleus.com' __license__ = 'Apache License, Version 2.0' __copyright__ = 'Copyright 2016, Syncleus, Inc. and contributors' __credits__ = [] @@ -79,24 +79,24 @@ class ApexParadigmPlugin(object): if band_path_net: if node == port['net']: frame['path'] = frame['path'][:hop_index] + [recv_port['identifier'] + '*'] +\ - [hop + "*"] + frame['path'][hop_index+1:] + [hop + '*'] + frame['path'][hop_index+1:] frame_hash = apex.aprs.util.hash_frame(frame) if frame_hash not in self.packet_cache.values(): self.packet_cache[str(frame_hash)] = frame_hash port['tnc'].write(frame, port['tnc_port']) self.aprsis.send(frame) - click.echo(port_name + " >> " + apex.aprs.util.format_aprs_frame(frame)) + click.echo(port_name + ' >> ' + apex.aprs.util.format_aprs_frame(frame)) return else: if port['net'].startswith(node): frame['path'] = frame['path'][:hop_index] + [recv_port['identifier'] + '*'] +\ - [hop + "*"] + frame['path'][hop_index+1:] + [hop + '*'] + frame['path'][hop_index+1:] frame_hash = apex.aprs.util.hash_frame(frame) if frame_hash not in self.packet_cache.values(): self.packet_cache[str(frame_hash)] = frame_hash port['tnc'].write(frame, port['tnc_port']) self.aprsis.send(frame) - click.echo(port_name + " >> " + apex.aprs.util.format_aprs_frame(frame)) + click.echo(port_name + ' >> ' + apex.aprs.util.format_aprs_frame(frame)) return if node == port_callsign and ssid == port_ssid: if ssid is 0: @@ -108,39 +108,39 @@ class ApexParadigmPlugin(object): self.packet_cache[str(frame_hash)] = frame_hash port['tnc'].write(frame, port['tnc_port']) self.aprsis.send(frame) - click.echo(port_name + " >> " + apex.aprs.util.format_aprs_frame(frame)) + click.echo(port_name + ' >> ' + apex.aprs.util.format_aprs_frame(frame)) return - elif node == "GATE" and port['net'].startswith("2M"): - frame['path'] = frame['path'][:hop_index] + [recv_port['identifier'] + '*'] + [node + "*"] +\ + elif node == 'GATE' and port['net'].startswith('2M'): + frame['path'] = frame['path'][:hop_index] + [recv_port['identifier'] + '*'] + [node + '*'] +\ frame['path'][hop_index+1:] frame_hash = apex.aprs.util.hash_frame(frame) if frame_hash not in self.packet_cache.values(): self.packet_cache[str(frame_hash)] = frame_hash port['tnc'].write(frame, port['tnc_port']) self.aprsis.send(frame) - click.echo(port_name + " >> " + apex.aprs.util.format_aprs_frame(frame)) + click.echo(port_name + ' >> ' + apex.aprs.util.format_aprs_frame(frame)) return if node.startswith('WIDE') and ssid > 1: frame['path'] = frame['path'][:hop_index] + [recv_port['identifier'] + '*'] +\ - [node + "-" + str(ssid-1)] + frame['path'][hop_index+1:] + [node + '-' + str(ssid-1)] + frame['path'][hop_index+1:] frame_hash = apex.aprs.util.hash_frame(frame) if frame_hash not in self.packet_cache.values(): self.packet_cache[str(frame_hash)] = frame_hash recv_port['tnc'].write(frame, recv_port['tnc_port']) self.aprsis.send(frame) - click.echo(recv_port_name + " >> " + apex.aprs.util.format_aprs_frame(frame)) + click.echo(recv_port_name + ' >> ' + apex.aprs.util.format_aprs_frame(frame)) return elif node.startswith('WIDE') and ssid is 1: - frame['path'] = frame['path'][:hop_index] + [recv_port['identifier'] + '*'] + [node + "*"] + frame['path'][hop_index+1:] + frame['path'] = frame['path'][:hop_index] + [recv_port['identifier'] + '*'] + [node + '*'] + frame['path'][hop_index+1:] frame_hash = apex.aprs.util.hash_frame(frame) if frame_hash not in self.packet_cache.values(): self.packet_cache[str(frame_hash)] = frame_hash recv_port['tnc'].write(frame, recv_port['tnc_port']) self.aprsis.send(frame) - click.echo(recv_port_name + " >> " + apex.aprs.util.format_aprs_frame(frame)) + click.echo(recv_port_name + ' >> ' + apex.aprs.util.format_aprs_frame(frame)) return elif node.startswith('WIDE') and ssid is 0: - frame['path'][hop_index] = node + "*" + frame['path'][hop_index] = node + '*' # no return else: # If we didnt digipeat it then we didn't modify the frame, send it to aprsis as-is @@ -256,9 +256,9 @@ class ApexParadigmPlugin(object): if hop[-1] != '*': if hop_index == selected_hop['index']: if selected_hop['band_path'] is None: - new_path += [hop + "*"] + new_path += [hop + '*'] else: - new_path += [selected_hop['port']['identifier'] + "*"] + [hop + "*"] + new_path += [selected_hop['port']['identifier'] + '*'] + [hop + '*'] elif hop_index > selected_hop['index']: new_path += [hop] else: @@ -269,7 +269,7 @@ class ApexParadigmPlugin(object): self.packet_cache[str(frame_hash)] = frame_hash selected_hop['port']['tnc'].write(frame, selected_hop['port']['tnc_port']) self.aprsis.send(frame) - click.echo(selected_hop['port_name'] + " >> " + apex.aprs.util.format_aprs_frame(frame)) + click.echo(selected_hop['port_name'] + ' >> ' + apex.aprs.util.format_aprs_frame(frame)) return def run(self): diff --git a/src/apex/plugins/beacon/__init__.py b/src/apex/plugins/beacon/__init__.py index 33daf7f..88c6205 100644 --- a/src/apex/plugins/beacon/__init__.py +++ b/src/apex/plugins/beacon/__init__.py @@ -9,8 +9,8 @@ import click import apex.aprs.util __author__ = 'Jeffrey Phillips Freeman (WI2ARD)' -__maintainer__ = "Jeffrey Phillips Freeman (WI2ARD)" -__email__ = "jeffrey.freeman@syncleus.com" +__maintainer__ = 'Jeffrey Phillips Freeman (WI2ARD)' +__email__ = 'jeffrey.freeman@syncleus.com' __license__ = 'Apache License, Version 2.0' __copyright__ = 'Copyright 2016, Syncleus, Inc. and contributors' __credits__ = [] @@ -36,8 +36,8 @@ class BeaconPlugin(object): self.aprsis = aprsis for section in config.sections(): - if section.startswith("TNC "): - tnc_name = section.split(" ")[1] + if section.startswith('TNC '): + tnc_name = section.split(' ')[1] for port_id in range(1, 1+int(config.get(section, 'port_count'))): port_name = tnc_name + '-' + str(port_id) port = port_map[port_name] @@ -56,5 +56,5 @@ class BeaconPlugin(object): if frame_hash not in self.packet_cache.values(): self.packet_cache[str(frame_hash)] = frame_hash port['tnc'].write(beacon_frame, port['tnc_port']) - click.echo(port_name + " >> " + apex.aprs.util.format_aprs_frame(beacon_frame)) + click.echo(port_name + ' >> ' + apex.aprs.util.format_aprs_frame(beacon_frame)) time.sleep(600) diff --git a/src/apex/plugins/id/__init__.py b/src/apex/plugins/id/__init__.py index 1d9a089..23a10e3 100644 --- a/src/apex/plugins/id/__init__.py +++ b/src/apex/plugins/id/__init__.py @@ -9,8 +9,8 @@ import click import apex.aprs.util __author__ = 'Jeffrey Phillips Freeman (WI2ARD)' -__maintainer__ = "Jeffrey Phillips Freeman (WI2ARD)" -__email__ = "jeffrey.freeman@syncleus.com" +__maintainer__ = 'Jeffrey Phillips Freeman (WI2ARD)' +__email__ = 'jeffrey.freeman@syncleus.com' __license__ = 'Apache License, Version 2.0' __copyright__ = 'Copyright 2016, Syncleus, Inc. and contributors' __credits__ = [] @@ -36,8 +36,8 @@ class IdPlugin(object): self.aprsis = aprsis for section in config.sections(): - if section.startswith("TNC "): - tnc_name = section.split(" ")[1] + if section.startswith('TNC '): + tnc_name = section.split(' ')[1] for port_id in range(1, 1+int(config.get(section, 'port_count'))): port_name = tnc_name + '-' + str(port_id) port = port_map[port_name] @@ -57,5 +57,5 @@ class IdPlugin(object): if frame_hash not in self.packet_cache.values(): self.packet_cache[str(frame_hash)] = frame_hash port['tnc'].write(id_frame, port['tnc_port']) - click.echo(port_name + " >> " + apex.aprs.util.format_aprs_frame(id_frame)) + click.echo(port_name + ' >> ' + apex.aprs.util.format_aprs_frame(id_frame)) time.sleep(600) diff --git a/src/apex/plugins/status/__init__.py b/src/apex/plugins/status/__init__.py index f938623..06c6e02 100644 --- a/src/apex/plugins/status/__init__.py +++ b/src/apex/plugins/status/__init__.py @@ -8,8 +8,8 @@ import time import apex.aprs.util __author__ = 'Jeffrey Phillips Freeman (WI2ARD)' -__maintainer__ = "Jeffrey Phillips Freeman (WI2ARD)" -__email__ = "jeffrey.freeman@syncleus.com" +__maintainer__ = 'Jeffrey Phillips Freeman (WI2ARD)' +__email__ = 'jeffrey.freeman@syncleus.com' __license__ = 'Apache License, Version 2.0' __copyright__ = 'Copyright 2016, Syncleus, Inc. and contributors' __credits__ = [] @@ -35,8 +35,8 @@ class StatusPlugin(object): self.aprsis = aprsis for section in config.sections(): - if section.startswith("TNC "): - tnc_name = section.split(" ")[1] + if section.startswith('TNC '): + tnc_name = section.split(' ')[1] for port_id in range(1, 1+int(config.get(section, 'port_count'))): port_name = tnc_name + '-' + str(port_id) port = port_map[port_name] @@ -59,5 +59,5 @@ class StatusPlugin(object): if frame_hash not in self.packet_cache.values(): self.packet_cache[str(frame_hash)] = frame_hash port['tnc'].write(status_frame, port['tnc_port']) - print(port_name + " >> " + apex.aprs.util.format_aprs_frame(status_frame)) + print(port_name + ' >> ' + apex.aprs.util.format_aprs_frame(status_frame)) time.sleep(600) -- GitLab