Project

General

Profile

Bug #6741

Updated by Wolfgang Schnerring over 9 years ago

* Der Fehler sollte nicht nur im Log auf der Konsole stehen 
 * Er sollte die verursachende Zeile aus dem timelog.txt enthalten 


 Beispiel-Szenario: Szenario: Man schreibt im gtimelog für ein Projekt Zeit auf, auf das man im Collmex vollen Zugriff hat. Im Kommentar vertippt man sich bei der Bugnummer, wodurch der Redmine-Zugriff fehlschlägt, und die Exception blubbert so ungeschickt nach oben, daß sie als HTTP-Fehler beim Collmex-Zugriff wahrgenommen wird. 

 <pre> 
 Traceback (most recent call last): 
   File "/opt/gtimelog/lib/python2.6/site-packages/gocept.gtimelog-0.4.1-py2.6.egg/gocept/gtimelog/gtimelog.py", line 1402, in on_fill_collmex_activate 
     collmex.report(window.all_entries()) 
   File "/opt/gtimelog/lib/python2.6/site-packages/gocept.gtimelog-0.4.1-py2.6.egg/gocept/gtimelog/collmex.py", line 58, in report 
     subject = red.get_subject(issue, project) 
   File "/opt/gtimelog/lib/python2.6/site-packages/gocept.gtimelog-0.4.1-py2.6.egg/gocept/gtimelog/redmine.py", line 113, in get_subject 
     return redmine and redmine.get_subject(issue_id) 
   File "/opt/gtimelog/lib/python2.6/site-packages/gocept.gtimelog-0.4.1-py2.6.egg/gocept/gtimelog/redmine.py", line 151, in get_subject 
     return self.api('Issue').find(issue_id).subject 
   File "/opt/gtimelog/lib/python2.6/site-packages/pyactiveresource-1.2dev_r77-py2.6.egg/pyactiveresource/activeresource.py", line 342, in find 
     return cls._find_single(id_, **kwargs) 
   File "/opt/gtimelog/lib/python2.6/site-packages/pyactiveresource-1.2dev_r77-py2.6.egg/pyactiveresource/activeresource.py", line 457, in _find_single 
     return cls._build_object(cls.connection.get(path, cls.headers), 
   File "/opt/gtimelog/lib/python2.6/site-packages/pyactiveresource-1.2dev_r77-py2.6.egg/pyactiveresource/connection.py", line 294, in get 
     return self.format.decode(self._open('GET', path, headers=headers).body) 
   File "/opt/gtimelog/lib/python2.6/site-packages/pyactiveresource-1.2dev_r77-py2.6.egg/pyactiveresource/connection.py", line 258, in _open 
     http_response = self._handle_error(err) 
   File "/opt/gtimelog/lib/python2.6/site-packages/pyactiveresource-1.2dev_r77-py2.6.egg/pyactiveresource/connection.py", line 369, in _handle_error 
     raise UnauthorizedAccess(err) 
 UnauthorizedAccess: HTTP Error 401: Authorization Required 
 Collmex: HTTP Error 401: Authorization Required 
 </pre>

Back