Make GTCli more robust

Bug #965583 reported by Izidor Matušov on 2012-03-26
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Getting Things GNOME!
High
Xuan (Sean) Hu

Bug Description

There are several crashes in gtcli utility (./gtcli), we need to solve all of them!

> ./gtcli show 'nonExisting'

Traceback (most recent call last):
  File "./gtcli", line 348, in <module>
    show_task(tid)
  File "./gtcli", line 96, in show_task
    task_data = timi.GetTask(tid)
  File "/usr/lib/python2.7/dist-packages/dbus/proxies.py", line 68, in __call__
    return self._proxy_method(*args, **keywords)
  File "/usr/lib/python2.7/dist-packages/dbus/proxies.py", line 143, in __call__
    **keywords)
  File "/usr/lib/python2.7/dist-packages/dbus/connection.py", line 630, in call_blocking
    message, timeout)
dbus.exceptions.DBusException: org.freedesktop.DBus.Python.AttributeError: Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/dbus/service.py", line 702, in _message_cb
    retval = candidate_method(self, *args, **keywords)
  File "/usr/share/gtg/GTG/gtk/dbuswrapper.py", line 99, in GetTask
  File "/usr/share/gtg/GTG/gtk/dbuswrapper.py", line 59, in task_to_dict
AttributeError: 'NoneType' object has no attribute 'get_id'

> ./gtcli list all
# it shows nothing but it should shove the same output as ./gtcli list

> ./gtcli count all
0
# it should return the same number as ./gtcli count

> ./gtcli summary all
# it returns for every day 0, it should return the same output as ./gtcli summary

 > ./gtcli postpone 'non-existing' tomorrow
Traceback (most recent call last):
  File "./gtcli", line 341, in <module>
    postpone(args[1], args[2])
  File "./gtcli", line 125, in postpone
    tasks = [ timi.GeTask(identifier) ]
  File "/usr/lib/python2.7/dist-packages/dbus/proxies.py", line 68, in __call__
    return self._proxy_method(*args, **keywords)
  File "/usr/lib/python2.7/dist-packages/dbus/proxies.py", line 143, in __call__
    **keywords)
  File "/usr/lib/python2.7/dist-packages/dbus/connection.py", line 630, in call_blocking
    message, timeout)
dbus.exceptions.DBusException: org.freedesktop.DBus.Error.UnknownMethod: Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/dbus/service.py", line 649, in _message_cb
    (candidate_method, parent_method) = _method_lookup(self, method_name, interface_name)
  File "/usr/lib/python2.7/dist-packages/dbus/service.py", line 244, in _method_lookup
    raise UnknownMethodException('%s is not a valid method of interface %s' % (method_name, dbus_interface))
UnknownMethodException: org.freedesktop.DBus.Error.UnknownMethod: Unknown method: GeTask is not a valid method of interface org.gnome.GTG

[2] SegFault (20:27) trunk > ./gtcli close 'nonexisting'
Traceback (most recent call last):
  File "./gtcli", line 335, in <module>
    close_task(tid)
  File "./gtcli", line 89, in close_task
    task_data = timi.GetTask(tid)
  File "/usr/lib/python2.7/dist-packages/dbus/proxies.py", line 68, in __call__
    return self._proxy_method(*args, **keywords)
  File "/usr/lib/python2.7/dist-packages/dbus/proxies.py", line 143, in __call__
    **keywords)
  File "/usr/lib/python2.7/dist-packages/dbus/connection.py", line 630, in call_blocking
    message, timeout)
dbus.exceptions.DBusException: org.freedesktop.DBus.Python.AttributeError: Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/dbus/service.py", line 702, in _message_cb
    retval = candidate_method(self, *args, **keywords)
  File "/usr/share/gtg/GTG/gtk/dbuswrapper.py", line 99, in GetTask
  File "/usr/share/gtg/GTG/gtk/dbuswrapper.py", line 59, in task_to_dict
AttributeError: 'NoneType' object has no attribute 'get_id'

Related branches

Izidor Matušov (izidor) on 2012-04-21
Changed in gtg:
assignee: nobody → huxuan (huxuan)
status: Confirmed → In Progress
Izidor Matušov (izidor) on 2012-04-22
Changed in gtg:
status: In Progress → Fix Committed
Changed in gtg:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers