Ubuntu

Gwibber shows "BUG:00:00:59:63" instead of "<x> seconds ago" in Twitter timeline

Reported by Jakob Pfender on 2011-01-20
24
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Gwibber
Undecided
Unassigned
gwibber (Ubuntu)
Low
Unassigned

Bug Description

Binary package hint: gwibber

Ubuntu Release: 10.10
Gwibber version: 2.32.2-0ubuntu2

Shortly after a timeline update, apparently if an update is younger than one second, the time is not displayed correctly as "less than 1 second ago", but rather as "BUG:00:00:59:xx" (followed by "from <application>" as usual).

Per Ångström (autark) wrote :

Seen this too, confirming. Same version as bug reporter.

Changed in gwibber (Ubuntu):
status: New → Confirmed
Per Ångström (autark) wrote :

Probably a duplicate of bug #705674.

Per Ångström (autark) wrote :

I see an inconsistency in the following code from util.py (condensed):

  elif d.seconds < 3600 and d.seconds >= 60:
    # ...
  elif round(d.seconds) < 60:
    # ...
  else: return "BUG: %s" % str(d)

Note the different handling of d.seconds: it is rounded in one expression but not the other. But I'm not fluent in Python so I don't know if this is significant or not.

Per Ångström (autark) wrote :

I concocted a small test program that mimics the logic in util.py:
----
def testit(v):
    print(v)
    if v >= 60:
        print ">= 60"
    elif round(v) < 60:
        print "< 60"
    else: print "err"

testit(59.4)
testit(59.5)
testit(59.6)
testit(60)
----

Output:

59.4
< 60
59.5
err
59.6
err
60
>= 60

This seems to confirm my hypothesis.

Per Ångström (autark) wrote :

This patch removes the rounding in the last elif condition, to avoid an error when the seconds part is between 59.5 and 60.0.

tags: added: patch
Kamus (kamus) on 2011-02-25
Changed in gwibber (Ubuntu):
importance: Undecided → Low
status: Confirmed → Triaged
Didier Roche (didrocks) wrote :

Ken, can you look at this patch please? :)

Changed in gwibber (Ubuntu):
assignee: nobody → Ken VanDine (ken-vandine)
assignee: Ken VanDine (ken-vandine) → nobody
Changed in gwibber:
status: New → Fix Committed
milestone: none → 2.91.92
Changed in gwibber (Ubuntu):
status: Triaged → Fix Committed
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package gwibber - 2.91.91.1-0ubuntu1

---------------
gwibber (2.91.91.1-0ubuntu1) natty; urgency=low

  * New upstream release
    - Remove the rounding in the last elif condition, to avoid an error when
      the seconds part is between 59.5 and 60.0. (Per Ångström) (LP: #705424)
    - Fixed handling of the in_reply_to data for twitter, and made minor
      changes to make sure identi.ca and status.net behaves the same
      way (LP: #677233)
 -- Ken VanDine <email address hidden> Fri, 11 Mar 2011 15:07:28 -0500

Changed in gwibber (Ubuntu):
status: Fix Committed → Fix Released
Changed in gwibber:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers