diff --git a/monitor.py b/monitor.py index a039276..3031997 100644 --- a/monitor.py +++ b/monitor.py @@ -530,20 +530,19 @@ def process_message(_bmessage): # log only to file if system is NOT OpenBridge event (not logging open bridge system, name depends on your OB definitions) AND transmit time is LONGER as 2sec (make sense for very short transmits) if LASTHEARD_INC: if int(float(p[9]))> 2: - curDir = os.getcwd() log_lh_message = '{},{},{},{},{},{},{},TS{},TG{},{},{},{}'.format(_now, p[9], p[0], p[1], p[3], p[5], alias_call(int(p[5]), subscriber_ids), p[7], p[8],alias_tgid(int(p[8]),talkgroup_ids),p[6], alias_short(int(p[6]), subscriber_ids)) - lh_logfile = open(curDir+"/log/lastheard.log", "a") + lh_logfile = open(LOG_PATH+"lastheard.log", "a") lh_logfile.write(log_lh_message + '\n') lh_logfile.close() # Lastheard in Dashboard by SP2ONG my_list=[] n=0 - f = open(curDir+"/templates/lastheard.html", "w") + f = open(PATH+"templates/lastheard.html", "w") f.write("
\n") f.write(" .: Lastheard :. \n") f.write("\n") f.write("\n") - with open(curDir+"/log/lastheard.log", "r") as textfile: + with open(LOG_PATH+"lastheard.log", "r") as textfile: for row in islice(reversed(list(csv.reader(textfile))),100): duration=row[1] dur=str(int(float(duration.strip())))
DateTimeSlotTG#TG NameCallsign (DMR-Id)NameDur TX (s)Source IDSystem