Changeset 1ba85cf for src/python/bin


Ignore:
Timestamp:
Aug 10, 2017, 8:21:46 PM (9 years ago)
Author:
Joachim Langenbach <joachim.langenbach@…>
Branches:
0.5, app-cordova, debian/bullseye, debian/jessie, master
Children:
85f32d8
Parents:
6fec060
git-author:
Joachim Langenbach <joachim.langenbach@…> (08/10/17 19:37:40)
git-committer:
Joachim Langenbach <joachim.langenbach@…> (08/10/17 20:21:46)
Message:
  • Fixed gnuboat daemon logging errors
  • Fixed minor issues in Webservice classes
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/python/bin/gnuboat

    r6fec060 r1ba85cf  
    3939
    4040# default values for command line arguments
    41 rrdfile = "/var/lib/gnuboat/log-webservice.rrd"
     41rrdfile = "/var/lib/gnuboat/gnuboat.rrd"
    4242shutdownfile = "/var/spool/gnuboat/shutdown.request"
    4343logdir = "/var/log/gnuboat"
    … …  
    118118def log(gpsFix, gpsTime, gpsStatus, latitude, latitudeDirection, longitude,
    119119        longitudeDirection, courseOverGround, speedOverGround, waterDepth, waterDepthValid):
     120    global logdir
    120121    global nmeafile
     122    global nmeaFileDate
    121123   
    122124    # Only log, if we have a gps fix
    … …  
    126128    nmeaFileDateShould = datetime.datetime.utcnow().strftime("%Y-%m-%d")
    127129    mode = 'A'
    128     if nmeafile == None or nmeaFileDate != nmeaFileDateShould:
    129         if nmeaFile:
     130    if nmeafile == None or nmeaFileDate is None or nmeaFileDate != nmeaFileDateShould:
     131        if nmeafile:
    130132                nmeafile.close()
    131133        try:
    … …  
    151153    global displayperiod
    152154    global logdir
    153     global nmeaLogFile
     155    global nmeafile
    154156
    155157    try:
Note: See TracChangeset for help on using the changeset viewer.