[chirp_devel] [PATCH 1 of 2] [th9800] Fix make_supported.py crash. #1353

# HG changeset patch # User Tom Hayward tom@tomh.us # Date 1409676819 25200 # Tue Sep 02 09:53:39 2014 -0700 # Node ID 7b543a135e41797f4686dbd58c3b4490644ab455 # Parent 4131463db7b8d8a27e4901d5fd8997c58a411a25 [th9800] Fix make_supported.py crash. #1353
make_supported.py does not provide pipe as a str like a normal instantiation, so it must be supported specifically in the Radio init.
diff -r 4131463db7b8 -r 7b543a135e41 chirp/th9800.py --- a/chirp/th9800.py Mon Sep 01 08:03:09 2014 -0700 +++ b/chirp/th9800.py Tue Sep 02 09:53:39 2014 -0700 @@ -66,8 +66,11 @@ self.errors = [] self._mmap = None
- self.pipe = None - self.load_mmap(pipe) + if isinstance(pipe, str): + self.pipe = None + self.load_mmap(pipe) + else: + chirp_common.FileBackedRadio.__init__(self, pipe)
def get_features(self): rf = chirp_common.RadioFeatures()

# HG changeset patch # User Tom Hayward tom@tomh.us # Date 1409676824 25200 # Tue Sep 02 09:53:44 2014 -0700 # Node ID 36eae335e8a7d9d28688d5353c1c8c2b8381501c # Parent 7b543a135e41797f4686dbd58c3b4490644ab455 Add make_supported.py to run_all_tests.sh. #1353
diff -r 7b543a135e41 -r 36eae335e8a7 run_all_tests.sh --- a/run_all_tests.sh Tue Sep 02 09:53:39 2014 -0700 +++ b/run_all_tests.sh Tue Sep 02 09:53:44 2014 -0700 @@ -18,11 +18,15 @@ (cd tests && ./run_tests) }
+function make_supported() { + ./share/make_supported.py > /dev/null +} + function style_tests() { ./tools/checkpatch.sh }
-TESTS="unit_tests driver_tests style_tests" +TESTS="unit_tests driver_tests make_supported style_tests" for testname in $TESTS; do eval "$testname" || record_failure "$testname" done
participants (1)
-
Tom Hayward