kopia lustrzana https://github.com/projecthorus/radiosonde_auto_rx
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
commit
96dc241d20
|
|
@ -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.
|
||||
|
|
|
|||
Ładowanie…
Reference in New Issue