class BugReport(object): def __init__(self, bug_dict): self.__data = bug_dict

Bug #172280 reported by Daniel Holbach
2
Affects Status Importance Assigned to Milestone
python-launchpad-bugs
Fix Released
Medium
Brian Murray

Bug Description

Traceback (most recent call last):
  File "./sponsors-page.py", line 137, in <module>
    main()
  File "./sponsors-page.py", line 73, in main
    Bug = Connector.ConnectBug(method="Text")
  File "launchpadbugs/connector.py", line 53, in __init__
    LaunchpadConnector.__init__(self, "Bug", method)
  File "launchpadbugs/connector.py", line 30, in __init__
    self.module = __import__(__connections[__module]["module"], globals(), locals(), [], -1)
  File "/home/daniel/bzr/sponsoring/launchpadbugs/text_bug.py", line 75
    class BugReport(object): def __init__(self, bug_dict): self.__data = bug_dict
                               ^
SyntaxError: invalid syntax

Revision history for this message
Daniel Holbach (dholbach) wrote :

This is with the latest bzr checkout.

Revision history for this message
Daniel Holbach (dholbach) wrote :
Revision history for this message
Daniel Holbach (dholbach) wrote :

Please run python -tt launchpadbugs/text_bug.py - there is still some breakage in there. Try to use spaces for indentation.

Also after applying my fix there is still breakage in parsing comments, at least that's what it looks like.

daniel@bert:~/bzr/sponsoring$ ./sponsors-page.py
/home/daniel/bzr/sponsoring/launchpadbugs/text_bug.py:14: FutureWarning: text_bug API not stable yet
  warnings.warn("text_bug API not stable yet", FutureWarning)
Traceback (most recent call last):
  File "./sponsors-page.py", line 137, in <module>
    main()
  File "./sponsors-page.py", line 80, in main
    if has_open_ubuntu_task(b.infotable):
  File "launchpadbugs/bugbase.py", line 17, in <lambda>
    if fget : fget = lambda s, n=fget.__name__ : getattr(s, n)()
  File "/home/daniel/bzr/sponsoring/launchpadbugs/text_bug.py", line 197, in get_infotable
    return self.__textpage["task"]
  File "/home/daniel/bzr/sponsoring/launchpadbugs/text_bug.py", line 102, in __getitem__
    self.parse()
  File "/home/daniel/bzr/sponsoring/launchpadbugs/text_bug.py", line 137, in parse
    assert len(x) == 2, "wrong line:%s" %l
AssertionError: wrong line:--===============4827465993340409152==

Revision history for this message
Daniel Holbach (dholbach) wrote :

Also I'd prefer if such changes went into some personal branch before they go into 'main'.

Revision history for this message
Daniel Holbach (dholbach) wrote :

Minimal test case:

import launchpadbugs.connector as Connector
Bug = Connector.ConnectBug(method="Text")
b = Bug(12345)
print b.infotable

Revision history for this message
Daniel Holbach (dholbach) wrote :

Ok, forget the second part of the bug report. I'll file a new bug.

Please commit the patch.

Changed in python-launchpad-bugs:
status: New → Fix Committed
Revision history for this message
Brian Murray (brian-murray) wrote :

I've merged the change to the main branch of python-launchpad-bugs as it was just a formatting issue but will make a new branch for development work of the +txt interface.

Changed in python-launchpad-bugs:
assignee: nobody → brian-murray
importance: Undecided → Medium
status: Fix Committed → Fix Released
Revision history for this message
Daniel Holbach (dholbach) wrote :

Rock on! :)

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.