Merge pull request #183 from darksidelemm/testing

Don't write new log files when the sonde type changes from RS41 to RS…
pull/186/head
Mark Jessop 2019-05-21 19:27:14 +09:30 zatwierdzone przez GitHub
commit 96dc241d20
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
1 zmienionych plików z 2 dodań i 1 usunięć

Wyświetl plik

@ -160,9 +160,10 @@ class TelemetryLogger(object):
_id = telemetry['id']
_type = telemetry['type']
# If there is no log open for the current ID check to see if there is an existing (closed) log file, and open it.
if _id not in self.open_logs:
_search_string = os.path.join(self.log_directory, "*%s_%s*_sonde.log" % (_id, _type))
_search_string = os.path.join(self.log_directory, "*%s_*_sonde.log" % (_id))
_existing_files = glob.glob(_search_string)
if len(_existing_files) != 0:
# Open the existing log file.