Re: minor bug on facts entry



Hi Jorge!

Most of the time you will not see facts without end-times, but when
you do - feel free just to ignore them. That's what hamster does. It's
like - if i have disabled the preference to stop tracking on shutdown,
and shutdown computer and turn it on the next day, then i will have a
fact without end time, and i might not care about it. Or, if i do, i
will go back and fix it.
But until i don't care, the system shouldn't care either :)

I'm somewhat afraid about this whole exporter motion going on from all
directions. But, hell, may the best code win :)
Somebody could take courage and reconcile the bugs though.

Regards,
Toms

On Tue, Dec 16, 2008 at 8:31 AM, Jorge Vargas <jorge vargas gmail com> wrote:
> Hello guys, I just took a second stab at my "exporter" but this time
> I'm using a different approach (code is cleaner), the code is nowhere
> near ready but it is currently exporting my database correctly.
>
> Anyway In the process I think I found a bug. For some reason I got
> several missing end_time strings. which are read by dbapi as null and
> translated to type into None which I'm catching like this
>
>        try:
>            fact_duration = fact.end_time-fact.start_time
>        except TypeError:
>            print "ERROR empty time"
>            fact_duration = datetime.timedelta(0)
>
> I got about 3 months worth of data on this particular export and maybe
> an averague of 6 entries per day, from all that I got
>
> ERROR empty time
> ERROR empty time
> ERROR empty time
> ERROR empty time
> ERROR empty time
> ERROR empty time
> ERROR empty time
> ERROR empty time
>
> so it doesn't seems terrible bad, but it's a bug. I wanted to see if
> it's known and or patched.
>
> As for the exporter this time for real I'll have something usable in
> the next couple of days, maybe tomorrow if things go right.
> _______________________________________________
> hamster-applet-devel-list mailing list
> hamster-applet-devel-list gnome org
> http://mail.gnome.org/mailman/listinfo/hamster-applet-devel-list
>


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]