~azzar1/unity/add-show-desktop-key

« back to all changes in this revision

Viewing changes to www/apps/tutorialservice/test/TestFramework.py

  • Committer: dilshan_a
  • Date: 2008-01-25 05:00:05 UTC
  • Revision ID: svn-v3-trunk0:2b9c9e99-6f39-0410-b283-7f802c844ae2:trunk:310
Add lineno to exception info.

Show diffs side-by-side

added added

removed removed

Lines of Context:
33
33
        cla, exc, trbk = exc_info
34
34
        self._name = cla.__name__
35
35
        self._detail = str(exc)
 
36
        self._trbk = trbk
36
37
 
37
38
    def is_critical(self):
38
39
        if (    self._name == 'FunctionNotFoundError'
43
44
            return False
44
45
 
45
46
    def to_dict(self):
 
47
        import traceback
46
48
        return {'name': self._name,
47
49
                'detail': self._detail,
48
50
                'critical': self.is_critical()
 
51
                'lineno': traceback.tb_lineno(self._trbk)
49
52
                }
50
53
 
51
54
    def __str__(self):