Skip to content

Commit b8eac95

Browse files
committed
merge with master
2 parents 9dfa2f2 + 61001ed commit b8eac95

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

63 files changed

+352
-338
lines changed

ait/core/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
# information to foreign countries or providing access to foreign persons.
1414
import sys
1515

16-
from ait.core import cfg
16+
from ait.core import cfg # noqa
1717
from ait.core import log
1818

1919
# cfg isn't used but we want the AIT-level config attribute created

ait/core/api.py

+6-3
Original file line numberDiff line numberDiff line change
@@ -92,8 +92,10 @@ def __str__(self):
9292

9393
@property
9494
def msg(self):
95-
s = 'FalseWaitError: "False" boolean passed as argument to wait. Ensure wait ' \
95+
s = (
96+
'FalseWaitError: "False" boolean passed as argument to wait. Ensure wait '
9697
'condition args are surrounded by lambda or " "'
98+
)
9799

98100
if self._msg:
99101
s += ": " + self._msg
@@ -110,7 +112,6 @@ class CmdAPI:
110112
"""
111113

112114
def __init__(self, udp_dest=None, cmddict=None, verbose=False, cmdtopic=None):
113-
114115
if cmddict is None:
115116
cmddict = cmd.getDefaultCmdDict()
116117

@@ -847,7 +848,9 @@ def _send_msg_box_request(self, data):
847848
log.error("User prompt request failed due to too many redirects")
848849
ret = None
849850
except requests.exceptions.Timeout:
850-
raise APITimeoutError(timeout=conn_timeout, msg="User confirm prompt timed out")
851+
raise APITimeoutError(
852+
timeout=conn_timeout, msg="User confirm prompt timed out"
853+
)
851854
except KeyError:
852855
log.error("User prompt request received malformed response")
853856
ret = None

ait/core/bin/ait_bsc_create_handler.py

+2-6
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
#!/usr/bin/env python
2-
32
# Advanced Multi-Mission Operations System (AMMOS) Instrument Toolkit (AIT)
43
# Bespoke Link to Instruments and Small Satellites (BLISS)
54
#
@@ -13,7 +12,6 @@
1312
# laws and regulations. User has the responsibility to obtain export licenses,
1413
# or other export authority as may be required before exporting such
1514
# information to foreign countries or providing access to foreign persons.
16-
1715
"""
1816
Usage:
1917
ait-bsc-create-handler [options] <name> <loc> <port> <conn_type>
@@ -35,8 +33,8 @@
3533
include handler metadata values as well as strftime
3634
format characters [default: %Y-%m-%d-%H-%M-%S-{name}.pcap]
3735
"""
38-
3936
import argparse
37+
4038
import requests
4139

4240

@@ -63,9 +61,7 @@ def main():
6361
default="day",
6462
)
6563
parser.add_argument("--rotate-log-delta", type=int, default=1)
66-
parser.add_argument(
67-
"--file-name-pattern", default="%Y-%m-%d-%H-%M-%S-{name}.pcap"
68-
)
64+
parser.add_argument("--file-name-pattern", default="%Y-%m-%d-%H-%M-%S-{name}.pcap")
6965

7066
# Get command line arguments
7167
args = vars(parser.parse_args())

ait/core/bin/ait_bsc_stop_handler.py

+1-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
#!/usr/bin/env python
2-
32
# Advanced Multi-Mission Operations System (AMMOS) Instrument Toolkit (AIT)
43
# Bespoke Link to Instruments and Small Satellites (BLISS)
54
#
@@ -13,7 +12,6 @@
1312
# laws and regulations. User has the responsibility to obtain export licenses,
1413
# or other export authority as may be required before exporting such
1514
# information to foreign countries or providing access to foreign persons.
16-
1715
"""
1816
Usage:
1917
ait-bsc-stop-handler [options] <name>
@@ -23,9 +21,9 @@
2321
--service-port=<port> The port for the BSC REST service connection
2422
[default: 8080]
2523
"""
24+
import argparse
2625

2726
import requests
28-
import argparse
2927

3028

3129
def main():

ait/core/bin/ait_ccsds_send_example.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
#!/usr/bin/env python
2-
32
import socket
43
import struct
54
import time
5+
66
from ait.core import log
77

88
s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)

ait/core/bin/ait_cmd_hist.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
#!/usr/bin/env python
2-
32
import argparse
43

5-
from ait.core import log, pcap
4+
from ait.core import log
5+
from ait.core import pcap
66

77

88
"""Query all commands from a Command History PCAP"""

ait/core/bin/ait_cmd_send.py

+3-5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
#!/usr/bin/env python
2-
32
# Advanced Multi-Mission Operations System (AMMOS) Instrument Toolkit (AIT)
43
# Bespoke Link to Instruments and Small Satellites (BLISS)
54
#
@@ -13,7 +12,6 @@
1312
# laws and regulations. User has the responsibility to obtain export licenses,
1413
# or other export authority as may be required before exporting such
1514
# information to foreign countries or providing access to foreign persons.
16-
1715
#
1816
#
1917
# Sends the given command and its arguments to the ISS simulator via
@@ -23,7 +21,6 @@
2321
# $ ait-cmd-send OCO3_CMD_START_SEQUENCE_NOW 1
2422
#
2523
#
26-
2724
"""
2825
usage: ait-cmd-send [options] command [arguments]
2926
@@ -40,12 +37,13 @@
4037
4138
$ ait-cmd-send OCO3_CMD_START_SEQUENCE_NOW 1
4239
"""
43-
4440
import argparse
4541
from collections import OrderedDict
4642

4743
import ait
48-
from ait.core import api, log, util
44+
from ait.core import api
45+
from ait.core import log
46+
from ait.core import util
4947

5048

5149
def main():

ait/core/bin/ait_create_dirs.py

+5-7
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
#!/usr/bin/env python
2-
32
# Advanced Multi-Mission Operations System (AMMOS) Instrument Toolkit (AIT)
43
# Bespoke Link to Instruments and Small Satellites (BLISS)
54
#
@@ -13,7 +12,6 @@
1312
# laws and regulations. User has the responsibility to obtain export licenses,
1413
# or other export authority as may be required before exporting such
1514
# information to foreign countries or providing access to foreign persons.
16-
1715
"""
1816
Usage:
1917
ait-create-dirs [options]
@@ -114,15 +112,15 @@
114112
115113
116114
"""
117-
118-
import os
119-
import errno
120-
import traceback
121115
import argparse
116+
import errno
117+
import os
122118
import time
119+
import traceback
123120

124121
import ait
125-
from ait.core import dmc, log
122+
from ait.core import dmc
123+
from ait.core import log
126124

127125

128126
def create_dir_struct(paths, verbose=True):

ait/core/bin/ait_dict_writer.py

+3-5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
#!/usr/bin/env python
2-
32
# Advanced Multi-Mission Operations System (AMMOS) Instrument Toolkit (AIT)
43
# Bespoke Link to Instruments and Small Satellites (BLISS)
54
#
@@ -13,7 +12,6 @@
1312
# laws and regulations. User has the responsibility to obtain export licenses,
1413
# or other export authority as may be required before exporting such
1514
# information to foreign countries or providing access to foreign persons.
16-
1715
"""
1816
Usage:
1917
ait-dict-writer [options] (--tlm | --cmd)
@@ -39,11 +37,11 @@
3937
Copyright 2016 California Institute of Technology. ALL RIGHTS RESERVED.
4038
U.S. Government Sponsorship acknowledged.
4139
"""
42-
43-
import sys
4440
import argparse
41+
import sys
4542

46-
from ait.core import log, tlm
43+
from ait.core import log
44+
from ait.core import tlm
4745

4846

4947
def main():

ait/core/bin/ait_limits_find_dn.py

-2
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
# laws and regulations. User has the responsibility to obtain export licenses,
1313
# or other export authority as may be required before exporting such
1414
# information to foreign countries or providing access to foreign persons.
15-
1615
"""
1716
ait-limits-find-dn
1817
@@ -39,7 +38,6 @@
3938
- TABLE_FOO
4039
- TABLE_BAR
4140
"""
42-
4341
from ait.core import limits
4442
from ait.core import log
4543
from ait.core import tlm

ait/core/bin/ait_mps_seq_convert.py

-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
#!/usr/bin/env python
2-
32
import argparse
43
import datetime as dt
54
import os.path

ait/core/bin/ait_pcap.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
#!/usr/bin/env python
2-
32
# Advanced Multi-Mission Operations System (AMMOS) Instrument Toolkit (AIT)
43
# Bespoke Link to Instruments and Small Satellites (BLISS)
54
#
@@ -13,16 +12,17 @@
1312
# laws and regulations. User has the responsibility to obtain export licenses,
1413
# or other export authority as may be required before exporting such
1514
# information to foreign countries or providing access to foreign persons.
16-
1715
"""
1816
Provides a command line script for running pcap library functions.
1917
"""
20-
2118
import argparse
2219
import datetime
2320
import os
2421

25-
from ait.core import dmc, log, pcap, util
22+
from ait.core import dmc
23+
from ait.core import log
24+
from ait.core import pcap
25+
from ait.core import util
2626

2727

2828
def main():

ait/core/bin/ait_pcap_segment.py

+2-6
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
#!/usr/bin/env python
2-
32
# Advanced Multi-Mission Operations System (AMMOS) Instrument Toolkit (AIT)
43
# Bespoke Link to Instruments and Small Satellites (BLISS)
54
#
@@ -13,8 +12,6 @@
1312
# laws and regulations. User has the responsibility to obtain export licenses,
1413
# or other export authority as may be required before exporting such
1514
# information to foreign countries or providing access to foreign persons.
16-
17-
1815
"""
1916
Segments one or more pcap files into multiple pcap files, according to
2017
a threshold number of bytes, packets, and/or seconds. New segment
@@ -37,11 +34,10 @@
3734
And a new file will be started when a packet is written with a
3835
timestamp that exceeds 2017-11-23 19:59:59.
3936
"""
40-
41-
4237
import argparse
4338

44-
from ait.core import log, pcap
39+
from ait.core import log
40+
from ait.core import pcap
4541

4642

4743
def main():

ait/core/bin/ait_seq_decode.py

+3-5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
#!/usr/bin/env python
2-
32
# Advanced Multi-Mission Operations System (AMMOS) Instrument Toolkit (AIT)
43
# Bespoke Link to Instruments and Small Satellites (BLISS)
54
#
@@ -13,7 +12,6 @@
1312
# laws and regulations. User has the responsibility to obtain export licenses,
1413
# or other export authority as may be required before exporting such
1514
# information to foreign countries or providing access to foreign persons.
16-
1715
"""
1816
1917
usage: ait-seq-decode ait_seq_SSS_desc_NNN.bin
@@ -24,11 +22,11 @@
2422
2523
$ ait-seq-decode seq/ait_seq_gps_reset_001.bin
2624
"""
27-
28-
import os
2925
import argparse
26+
import os
3027

31-
from ait.core import log, seq
28+
from ait.core import log
29+
from ait.core import seq
3230

3331

3432
def main():

ait/core/bin/ait_seq_encode.py

+3-5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
#!/usr/bin/env python
2-
32
# Advanced Multi-Mission Operations System (AMMOS) Instrument Toolkit (AIT)
43
# Bespoke Link to Instruments and Small Satellites (BLISS)
54
#
@@ -13,7 +12,6 @@
1312
# laws and regulations. User has the responsibility to obtain export licenses,
1413
# or other export authority as may be required before exporting such
1514
# information to foreign countries or providing access to foreign persons.
16-
1715
"""
1816
usage: ait-seq-encode mission_seq_SSS_desc_NNN.txt
1917
where:
@@ -27,12 +25,12 @@
2725
2826
$ ait-seq-encode seq/ait_seq_gps_reset_001.txt
2927
"""
30-
28+
import argparse
3129
import os
3230
import sys
33-
import argparse
3431

35-
from ait.core import log, seq
32+
from ait.core import log
33+
from ait.core import seq
3634

3735

3836
def main():

ait/core/bin/ait_seq_print.py

+3-5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
#!/usr/bin/env python
2-
32
# Advanced Multi-Mission Operations System (AMMOS) Instrument Toolkit (AIT)
43
# Bespoke Link to Instruments and Small Satellites (BLISS)
54
#
@@ -13,7 +12,6 @@
1312
# laws and regulations. User has the responsibility to obtain export licenses,
1413
# or other export authority as may be required before exporting such
1514
# information to foreign countries or providing access to foreign persons.
16-
1715
"""
1816
usage: ait-seq-print ait_seq_SSS_NNN_desc.bin
1917
@@ -24,11 +22,11 @@
2422
2523
$ ait-seq-print seq/ait_seq_gps_001_reset.bin
2624
"""
27-
28-
import os
2925
import argparse
26+
import os
3027

31-
from ait.core import log, seq
28+
from ait.core import log
29+
from ait.core import seq
3230

3331

3432
def main():

0 commit comments

Comments
 (0)