Pages

Navitron

2016-01-26

Bug squashed in data logger

Ooops!  I've just spotted a bug in my Raspberry Pi Sense HAT datalogging script.  The 'time' command causes the system to crash.  This is because you can't concatenate a date/time object to a string without first converting it to a string.  

The code should read:

    def do_time(self, args):
        """\n>Displays the current date/time"""
        self.mylog.setTime()
        print("\n>"+str(self.mylog.getTime()))

It is all fixed now.


No comments:

Post a Comment