9
from HTMLOperations import Bug
9
import connector as Connector
10
10
from commandLine import commandLine
11
11
import utils as utils
13
13
from bugHelper.commandLine import commandLine
14
from launchpadBugs.HTMLOperations import Bug
14
import launchpadbugs.connector as Connector
15
15
import launchpadBugs.utils as utils
20
Bug = Connector.ConnectBug()
23
cookie = cl.options.cookie
26
cookie = os.path.expanduser(config.cookie)
28
print >> sys.stderr, "No cookie-file found"
30
Bug.authentication=cookie
19
32
if not cl.options.bugnr:
20
33
cl.parser.print_usage()
23
bug= Bug(cl.options.bugnr)
36
bug= Bug(int(cl.options.bugnr))
25
38
if cl.options.comments:
26
comments = bug.Comments()
39
comments = bug.comments
27
40
print "Comments:", len(comments)
29
42
if cl.options.reporter:
31
44
if cl.options.title:
33
46
if cl.options.tags:
35
48
if cl.options.countcomments:
36
comments = bug.Comments()
49
comments = bug.comments
37
50
print len(comments)
38
51
if cl.options.comment or cl.options.lastcomment:
39
comments = comment = bug.Comments()
40
if cl.options.lastcomment:
41
cl.options.comment = int(comment[len(comment)-1][0])
42
comment = filter(lambda c: int(c[0])==cl.options.comment, comment)
52
comments = bug.comments
53
cnr = -1 if cl.options.lastcomment else cl.options.comment
54
comment = comments[int(cnr)]
44
56
if cl.options.author:
46
58
if cl.options.date:
48
60
if not cl.options.author and not cl.options.date:
50
62
elif cl.options.verbose:
65
text += c.number + ', '
54
66
print "available comments: %s" % text