Merge lp:~oubiwann/ubuntu-community-accomplishments/946809-module-changes into lp:~ubuntu-community-accomplishments-reviewers/ubuntu-community-accomplishments/0.1

Proposed by Duncan McGreggor
Status: Merged
Approved by: Jono Bacon
Approved revision: 34
Merge reported by: Duncan McGreggor
Merged at revision: not available
Proposed branch: lp:~oubiwann/ubuntu-community-accomplishments/946809-module-changes
Merge into: lp:~ubuntu-community-accomplishments-reviewers/ubuntu-community-accomplishments/0.1
Diff against target: 808 lines (+127/-194)
14 files modified
scripts/ubuntu-community/community-council-member.py (+8/-13)
scripts/ubuntu-community/core-dev.py (+8/-13)
scripts/ubuntu-community/first-bug-confirmed.py (+12/-14)
scripts/ubuntu-community/first-bug.py (+12/-13)
scripts/ubuntu-community/fridge-editor.py (+8/-14)
scripts/ubuntu-community/juju-charm-contributor.py (+10/-15)
scripts/ubuntu-community/juju-charm-reviewer.py (+8/-15)
scripts/ubuntu-community/loco-council-member.py (+10/-16)
scripts/ubuntu-community/member-loco-team.py (+9/-13)
scripts/ubuntu-community/motu.py (+8/-15)
scripts/ubuntu-community/registered-on-launchpad.py (+10/-12)
scripts/ubuntu-community/signed-code-of-conduct.py (+8/-11)
scripts/ubuntu-community/technical-board-member.py (+8/-15)
scripts/ubuntu-community/ubuntu-member.py (+8/-15)
To merge this branch: bzr merge lp:~oubiwann/ubuntu-community-accomplishments/946809-module-changes
Reviewer Review Type Date Requested Status
Duncan McGreggor (community) Approve
Jono Bacon Disapprove
Review via email: mp+95835@code.launchpad.net

Description of the change

Note that this needs to be merged at the same (approximate) time as the other branch (https://code.launchpad.net/~oubiwann/ubuntu-accomplishments-system/941255-unified-source-dir) since they depend upon each other.

To post a comment you must log in.
Revision history for this message
Jono Bacon (jonobacon) wrote :

Looks like this was mean't to go into lp:ubuntu-accomplishments-system instead. Rejecting: feel free to re-post the MP there.

review: Disapprove
Revision history for this message
Duncan McGreggor (oubiwann) wrote :

Wait, so I don't understand your merge comment, Jono:

"Looks like this was mean't to go into lp:ubuntu-accomplishments-system"

That's correct, this wasn't mean to go into there. If you look at the top of the merge proposal page, you'll see this:

  Merge into: lp:ubuntu-community-accomplishments

The community accomplishments code is what this change is against.

The reason that this is needed, is that the deamon code location has changed. As such, the imports in this code need to change...

review: Needs Resubmitting
Revision history for this message
Jono Bacon (jonobacon) wrote :

Oh I see, gotcha. I will take a look soon.

On 5 March 2012 06:21, Duncan McGreggor <email address hidden> wrote:
> Review: Resubmit
>
> Wait, so I don't understand your merge comment, Jono:
>
> "Looks like this was mean't to go into lp:ubuntu-accomplishments-system"
>
> That's correct, this wasn't mean to go into there. If you look at the top of the merge proposal page, you'll see this:
>
>  Merge into:   lp:ubuntu-community-accomplishments
>
> The community accomplishments code is what this change is against.
>
> The reason that this is needed, is that the deamon code location has changed. As such, the imports in this code need to change...
> --
> https://code.launchpad.net/~oubiwann/ubuntu-community-accomplishments/946809-module-changes/+merge/95835
> You are reviewing the proposed merge of lp:~oubiwann/ubuntu-community-accomplishments/946809-module-changes into lp:ubuntu-community-accomplishments.

--
Jono Bacon
Ubuntu Community Manager
www.ubuntu.com / www.jonobacon.org
www.identi.ca/jonobacon www.twitter.com/jonobacon

Revision history for this message
Duncan McGreggor (oubiwann) wrote :

For the record, Jono merged this yesterday, even though the status of the branch shows him having rejected it.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'scripts/ubuntu-community/community-council-member.py'
2--- scripts/ubuntu-community/community-council-member.py 2012-02-24 00:08:50 +0000
3+++ scripts/ubuntu-community/community-council-member.py 2012-03-05 03:55:20 +0000
4@@ -1,35 +1,32 @@
5 #!/usr/bin/python
6-
7 import traceback, sys
8-import libaccomplishments
9+
10+from accomplishments.daemon import dbusapi
11+
12
13 try:
14 import json, sys, os, pwd, subprocess
15 from ubuntuone.couch import auth
16 from launchpadlib.launchpad import Launchpad
17
18- libaccom = libaccomplishments.Accomplishments()
19-
20- f = libaccom.getExtraInformation("ubuntu-community", "launchpad-email")
21-
22+ api = dbusapi.Accomplishments()
23+ f = api.getExtraInformation("ubuntu-community", "launchpad-email")
24 if bool(f[0]["launchpad-email"]) == False:
25 sys.exit(4)
26 else:
27 email = f[0]["launchpad-email"]
28
29- lp=Launchpad.login_anonymously('ubuntu-community accomplishments','production')
30- me=lp.people.getByEmail(email=email)
31+ lp = Launchpad.login_anonymously(
32+ 'ubuntu-community accomplishments', 'production')
33+ me = lp.people.getByEmail(email=email)
34
35 if me == None:
36 sys.exit(1)
37 else:
38 user = me.name
39-
40 teams = [team.name for team in lp.people['communitycouncil'].sub_teams]
41-
42 if teams == []:
43 teams.append(lp.people['communitycouncil'].name)
44-
45 try:
46 memberships = [
47 membership for membership in
48@@ -38,7 +35,6 @@
49 ['communitycouncil'] + teams]
50 except KeyError:
51 memberships = []
52-
53 if memberships:
54 sys.exit(0)
55 else:
56@@ -49,4 +45,3 @@
57 except:
58 traceback.print_exc()
59 sys.exit(2)
60-
61
62=== modified file 'scripts/ubuntu-community/core-dev.py'
63--- scripts/ubuntu-community/core-dev.py 2012-02-21 03:39:06 +0000
64+++ scripts/ubuntu-community/core-dev.py 2012-03-05 03:55:20 +0000
65@@ -1,35 +1,32 @@
66 #!/usr/bin/python
67-
68 import traceback, sys
69-import libaccomplishments
70+
71+from accomplishments.daemon import dbusapi
72+
73
74 try:
75 import json, sys, os, pwd, subprocess
76 from ubuntuone.couch import auth
77 from launchpadlib.launchpad import Launchpad
78
79- libaccom = libaccomplishments.Accomplishments()
80-
81- f = libaccom.getExtraInformation("ubuntu-community", "launchpad-email")
82-
83+ api = dbusapi.Accomplishments()
84+ f = api.getExtraInformation("ubuntu-community", "launchpad-email")
85 if bool(f[0]["launchpad-email"]) == False:
86 sys.exit(4)
87 else:
88 email = f[0]["launchpad-email"]
89
90- lp=Launchpad.login_anonymously('ubuntu-community accomplishments','production')
91- me=lp.people.getByEmail(email=email)
92+ lp = Launchpad.login_anonymously(
93+ 'ubuntu-community accomplishments', 'production')
94+ me = lp.people.getByEmail(email=email)
95
96 if me == None:
97 sys.exit(1)
98 else:
99 user = me.name
100-
101 teams = [team.name for team in lp.people['ubuntu-core-dev'].sub_teams]
102-
103 if teams == []:
104 teams.append(lp.people['ubuntu-core-dev'].name)
105-
106 try:
107 memberships = [
108 membership for membership in
109@@ -38,7 +35,6 @@
110 ['ubuntu-core-dev'] + teams]
111 except KeyError:
112 memberships = []
113-
114 if memberships:
115 sys.exit(0)
116 else:
117@@ -49,4 +45,3 @@
118 except:
119 traceback.print_exc()
120 sys.exit(2)
121-
122
123=== modified file 'scripts/ubuntu-community/first-bug-confirmed.py'
124--- scripts/ubuntu-community/first-bug-confirmed.py 2012-03-02 14:14:47 +0000
125+++ scripts/ubuntu-community/first-bug-confirmed.py 2012-03-05 03:55:20 +0000
126@@ -1,34 +1,33 @@
127 #!/usr/bin/python
128-
129 import traceback, sys
130-import libaccomplishments
131+
132+from accomplishments.daemon import dbusapi
133+
134
135 try:
136 import json, sys, os, pwd, subprocess
137 from ubuntuone.couch import auth
138 from launchpadlib.launchpad import Launchpad
139
140- libaccom = libaccomplishments.Accomplishments()
141-
142- f = libaccom.getExtraInformation("ubuntu-community", "launchpad-email")
143-
144+ api = dbusapi.Accomplishments()
145+ f = api.getExtraInformation("ubuntu-community", "launchpad-email")
146 if bool(f[0]["launchpad-email"]) == False:
147 sys.exit(4)
148 else:
149 email = f[0]["launchpad-email"]
150
151- # Get count of bugs reported by user from Launchpad, using email to identify
152- l=Launchpad.login_anonymously('ubuntu-community accomplishments','production')
153- me=l.people.getByEmail(email=email)
154-
155+ # Get count of bugs reported by user from Launchpad, using email to
156+ # identify
157+ l = Launchpad.login_anonymously(
158+ 'ubuntu-community accomplishments', 'production')
159+ me = l.people.getByEmail(email=email)
160 if me == None:
161 sys.exit(1)
162 else:
163 ubuntu=l.projects['ubuntu']
164 bugs_reported = ubuntu.searchTasks(bug_reporter=me,
165- status=['Confirmed', 'Triaged',
166- 'In Progress', 'Fix Committed', 'Fix Released'])
167-
168+ status=['Confirmed', 'Triaged', 'In Progress', 'Fix Committed',
169+ 'Fix Released'])
170 if len(bugs_reported) > 0:
171 sys.exit(0)
172 else:
173@@ -39,4 +38,3 @@
174 except:
175 traceback.print_exc()
176 sys.exit(2)
177-
178
179=== modified file 'scripts/ubuntu-community/first-bug.py'
180--- scripts/ubuntu-community/first-bug.py 2012-02-18 00:01:46 +0000
181+++ scripts/ubuntu-community/first-bug.py 2012-03-05 03:55:20 +0000
182@@ -1,34 +1,34 @@
183 #!/usr/bin/python
184-
185 import traceback, sys
186-import libaccomplishments
187+
188+from accomplishments.daemon import dbusapi
189+
190
191 try:
192 import json, sys, os, pwd, subprocess
193 from ubuntuone.couch import auth
194 from launchpadlib.launchpad import Launchpad
195
196- libaccom = libaccomplishments.Accomplishments()
197-
198- f = libaccom.getExtraInformation("ubuntu-community", "launchpad-email")
199-
200+ api = dbusapi.Accomplishments()
201+ f = api.getExtraInformation("ubuntu-community", "launchpad-email")
202 if bool(f[0]["launchpad-email"]) == False:
203 sys.exit(4)
204 else:
205 email = f[0]["launchpad-email"]
206
207- # Get count of bugs reported by user from Launchpad, using email to identify
208- l=Launchpad.login_anonymously('ubuntu-community accomplishments','production')
209- me=l.people.getByEmail(email=email)
210-
211+ # Get count of bugs reported by user from Launchpad, using email to
212+ # identify
213+ l = Launchpad.login_anonymously(
214+ 'ubuntu-community accomplishments', 'production')
215+ me = l.people.getByEmail(email=email)
216 if me == None:
217 sys.exit(1)
218 else:
219 ubuntu=l.projects['ubuntu']
220 bugs_reported = ubuntu.searchTasks(bug_reporter=me,
221 status=['New', 'Incomplete', 'Invalid', 'Confirmed', 'Triaged',
222- 'In Progress', 'Fix Committed', 'Fix Released', 'Opinion', "Won't Fix"])
223-
224+ 'In Progress', 'Fix Committed', 'Fix Released', 'Opinion',
225+ "Won't Fix"])
226 if len(bugs_reported) > 0:
227 sys.exit(0)
228 else:
229@@ -39,4 +39,3 @@
230 except:
231 traceback.print_exc()
232 sys.exit(2)
233-
234
235=== modified file 'scripts/ubuntu-community/fridge-editor.py'
236--- scripts/ubuntu-community/fridge-editor.py 2012-02-22 01:10:42 +0000
237+++ scripts/ubuntu-community/fridge-editor.py 2012-03-05 03:55:20 +0000
238@@ -1,35 +1,31 @@
239 #!/usr/bin/python
240-
241 import traceback, sys
242-import libaccomplishments
243+
244+from accomplishments.daemon import dbusapi
245+
246
247 try:
248 import json, sys, os, pwd, subprocess
249 from ubuntuone.couch import auth
250 from launchpadlib.launchpad import Launchpad
251
252- libaccom = libaccomplishments.Accomplishments()
253-
254- f = libaccom.getExtraInformation("ubuntu-community", "launchpad-email")
255-
256+ api = dbusapi.Accomplishments()
257+ f = api.getExtraInformation("ubuntu-community", "launchpad-email")
258 if bool(f[0]["launchpad-email"]) == False:
259 sys.exit(4)
260 else:
261 email = f[0]["launchpad-email"]
262
263- lp=Launchpad.login_anonymously('ubuntu-community accomplishments','production')
264- me=lp.people.getByEmail(email=email)
265-
266+ lp = Launchpad.login_anonymously(
267+ 'ubuntu-community accomplishments', 'production')
268+ me = lp.people.getByEmail(email=email)
269 if me == None:
270 sys.exit(1)
271 else:
272 user = me.name
273-
274 teams = [team.name for team in lp.people['ubuntu-fridge'].sub_teams]
275-
276 if teams == []:
277 teams.append(lp.people['ubuntu-fridge'].name)
278-
279 try:
280 memberships = [
281 membership for membership in
282@@ -38,7 +34,6 @@
283 ['ubuntu-fridge'] + teams]
284 except KeyError:
285 memberships = []
286-
287 if memberships:
288 sys.exit(0)
289 else:
290@@ -49,4 +44,3 @@
291 except:
292 traceback.print_exc()
293 sys.exit(2)
294-
295
296=== modified file 'scripts/ubuntu-community/juju-charm-contributor.py'
297--- scripts/ubuntu-community/juju-charm-contributor.py 2012-02-21 03:39:06 +0000
298+++ scripts/ubuntu-community/juju-charm-contributor.py 2012-03-05 03:55:20 +0000
299@@ -1,35 +1,32 @@
300 #!/usr/bin/python
301-
302 import traceback, sys
303-import libaccomplishments
304+
305+from accomplishments.daemon import dbusapi
306+
307
308 try:
309 import json, sys, os, pwd, subprocess
310 from ubuntuone.couch import auth
311 from launchpadlib.launchpad import Launchpad
312
313- libaccom = libaccomplishments.Accomplishments()
314-
315- f = libaccom.getExtraInformation("ubuntu-community", "launchpad-email")
316-
317+ api = dbusapi.Accomplishments()
318+ f = api.getExtraInformation("ubuntu-community", "launchpad-email")
319 if bool(f[0]["launchpad-email"]) == False:
320 sys.exit(4)
321 else:
322 email = f[0]["launchpad-email"]
323
324- lp=Launchpad.login_anonymously('ubuntu-community accomplishments','production')
325- me=lp.people.getByEmail(email=email)
326-
327+ lp = Launchpad.login_anonymously(
328+ 'ubuntu-community accomplishments', 'production')
329+ me = lp.people.getByEmail(email=email)
330 if me == None:
331 sys.exit(1)
332 else:
333 user = me.name
334-
335- teams = [team.name for team in lp.people['charm-contributors'].sub_teams]
336-
337+ teams = [team.name for team in
338+ lp.people['charm-contributors'].sub_teams]
339 if teams == []:
340 teams.append(lp.people['charm-contributors'].name)
341-
342 try:
343 memberships = [
344 membership for membership in
345@@ -38,7 +35,6 @@
346 ['charm-contributors'] + teams]
347 except KeyError:
348 memberships = []
349-
350 if memberships:
351 sys.exit(0)
352 else:
353@@ -49,4 +45,3 @@
354 except:
355 traceback.print_exc()
356 sys.exit(2)
357-
358
359=== modified file 'scripts/ubuntu-community/juju-charm-reviewer.py'
360--- scripts/ubuntu-community/juju-charm-reviewer.py 2012-02-21 03:39:06 +0000
361+++ scripts/ubuntu-community/juju-charm-reviewer.py 2012-03-05 03:55:20 +0000
362@@ -1,35 +1,30 @@
363 #!/usr/bin/python
364-
365 import traceback, sys
366-import libaccomplishments
367+
368+from accomplishments.daemon import dbusapi
369+
370
371 try:
372 import json, sys, os, pwd, subprocess
373 from ubuntuone.couch import auth
374 from launchpadlib.launchpad import Launchpad
375
376- libaccom = libaccomplishments.Accomplishments()
377-
378- f = libaccom.getExtraInformation("ubuntu-community", "launchpad-email")
379-
380+ api = dbusapi.Accomplishments()
381+ f = api.getExtraInformation("ubuntu-community", "launchpad-email")
382 if bool(f[0]["launchpad-email"]) == False:
383 sys.exit(4)
384 else:
385 email = f[0]["launchpad-email"]
386-
387- lp=Launchpad.login_anonymously('ubuntu-community accomplishments','production')
388- me=lp.people.getByEmail(email=email)
389-
390+ lp = Launchpad.login_anonymously(
391+ 'ubuntu-community accomplishments', 'production')
392+ me = lp.people.getByEmail(email=email)
393 if me == None:
394 sys.exit(1)
395 else:
396 user = me.name
397-
398 teams = [team.name for team in lp.people['charmers'].sub_teams]
399-
400 if teams == []:
401 teams.append(lp.people['charmers'].name)
402-
403 try:
404 memberships = [
405 membership for membership in
406@@ -38,7 +33,6 @@
407 ['charmers'] + teams]
408 except KeyError:
409 memberships = []
410-
411 if memberships:
412 sys.exit(0)
413 else:
414@@ -49,4 +43,3 @@
415 except:
416 traceback.print_exc()
417 sys.exit(2)
418-
419
420=== modified file 'scripts/ubuntu-community/loco-council-member.py'
421--- scripts/ubuntu-community/loco-council-member.py 2012-02-24 00:08:50 +0000
422+++ scripts/ubuntu-community/loco-council-member.py 2012-03-05 03:55:20 +0000
423@@ -1,35 +1,31 @@
424 #!/usr/bin/python
425-
426 import traceback, sys
427-import libaccomplishments
428+
429+from accomplishments.daemon import dbusapi
430+
431
432 try:
433 import json, sys, os, pwd, subprocess
434 from ubuntuone.couch import auth
435 from launchpadlib.launchpad import Launchpad
436
437- libaccom = libaccomplishments.Accomplishments()
438-
439- f = libaccom.getExtraInformation("ubuntu-community", "launchpad-email")
440-
441+ api = dbusapi.Accomplishments()
442+ f = api.getExtraInformation("ubuntu-community", "launchpad-email")
443 if bool(f[0]["launchpad-email"]) == False:
444 sys.exit(4)
445 else:
446 email = f[0]["launchpad-email"]
447-
448- lp=Launchpad.login_anonymously('ubuntu-community accomplishments','production')
449- me=lp.people.getByEmail(email=email)
450-
451+ lp = Launchpad.login_anonymously(
452+ 'ubuntu-community accomplishments', 'production')
453+ me = lp.people.getByEmail(email=email)
454 if me == None:
455 sys.exit(1)
456 else:
457 user = me.name
458-
459- teams = [team.name for team in lp.people['ubuntu-lococouncil'].sub_teams]
460-
461+ teams = [team.name for team in
462+ lp.people['ubuntu-lococouncil'].sub_teams]
463 if teams == []:
464 teams.append(lp.people['ubuntu-lococouncil'].name)
465-
466 try:
467 memberships = [
468 membership for membership in
469@@ -38,7 +34,6 @@
470 ['ubuntu-lococouncil'] + teams]
471 except KeyError:
472 memberships = []
473-
474 if memberships:
475 sys.exit(0)
476 else:
477@@ -49,4 +44,3 @@
478 except:
479 traceback.print_exc()
480 sys.exit(2)
481-
482
483=== modified file 'scripts/ubuntu-community/member-loco-team.py'
484--- scripts/ubuntu-community/member-loco-team.py 2012-02-23 06:57:16 +0000
485+++ scripts/ubuntu-community/member-loco-team.py 2012-03-05 03:55:20 +0000
486@@ -1,25 +1,23 @@
487 #!/usr/bin/python
488-
489 import traceback, sys
490-import libaccomplishments
491+
492+from accomplishments.daemon import dbusapi
493+
494
495 try:
496 import json, sys, os, pwd, subprocess
497 from ubuntuone.couch import auth
498 from launchpadlib.launchpad import Launchpad
499
500- libaccom = libaccomplishments.Accomplishments()
501-
502- f = libaccom.getExtraInformation("ubuntu-community", "launchpad-email")
503-
504+ api = dbusapi.Accomplishments()
505+ f = api.getExtraInformation("ubuntu-community", "launchpad-email")
506 if bool(f[0]["launchpad-email"]) == False:
507 sys.exit(2)
508 else:
509 email = f[0]["launchpad-email"]
510-
511- lp=Launchpad.login_anonymously('ubuntu-community accomplishments','production')
512- me=lp.people.getByEmail(email=email)
513-
514+ lp = Launchpad.login_anonymously(
515+ 'ubuntu-community accomplishments', 'production')
516+ me = lp.people.getByEmail(email=email)
517 if me == None:
518 sys.exit(1)
519 else:
520@@ -29,15 +27,13 @@
521 for sup in team.super_teams:
522 if "locoteams" in sup.self_link.rsplit('~', 1)[-1]:
523 final.append(sup)
524-
525 if len(final) is not 0:
526 sys.exit(0)
527 else:
528 sys.exit(1)
529-
530+
531 except SystemExit, e:
532 sys.exit(e.code)
533 except:
534 traceback.print_exc()
535 sys.exit(2)
536-
537
538=== modified file 'scripts/ubuntu-community/motu.py'
539--- scripts/ubuntu-community/motu.py 2012-02-21 03:39:06 +0000
540+++ scripts/ubuntu-community/motu.py 2012-03-05 03:55:20 +0000
541@@ -1,35 +1,30 @@
542 #!/usr/bin/python
543-
544 import traceback, sys
545-import libaccomplishments
546+
547+from accomplishments.daemon import dbusapi
548+
549
550 try:
551 import json, sys, os, pwd, subprocess
552 from ubuntuone.couch import auth
553 from launchpadlib.launchpad import Launchpad
554
555- libaccom = libaccomplishments.Accomplishments()
556-
557- f = libaccom.getExtraInformation("ubuntu-community", "launchpad-email")
558-
559+ api = dbusapi.Accomplishments()
560+ f = api.getExtraInformation("ubuntu-community", "launchpad-email")
561 if bool(f[0]["launchpad-email"]) == False:
562 sys.exit(4)
563 else:
564 email = f[0]["launchpad-email"]
565-
566- lp=Launchpad.login_anonymously('ubuntu-community accomplishments','production')
567- me=lp.people.getByEmail(email=email)
568-
569+ lp = Launchpad.login_anonymously(
570+ 'ubuntu-community accomplishments', 'production')
571+ me = lp.people.getByEmail(email=email)
572 if me == None:
573 sys.exit(1)
574 else:
575 user = me.name
576-
577 teams = [team.name for team in lp.people['motu'].sub_teams]
578-
579 if teams == []:
580 teams.append(lp.people['motu'].name)
581-
582 try:
583 memberships = [
584 membership for membership in
585@@ -38,7 +33,6 @@
586 ['motu'] + teams]
587 except KeyError:
588 memberships = []
589-
590 if memberships:
591 sys.exit(0)
592 else:
593@@ -49,4 +43,3 @@
594 except:
595 traceback.print_exc()
596 sys.exit(2)
597-
598
599=== modified file 'scripts/ubuntu-community/registered-on-launchpad.py'
600--- scripts/ubuntu-community/registered-on-launchpad.py 2012-02-15 22:14:37 +0000
601+++ scripts/ubuntu-community/registered-on-launchpad.py 2012-03-05 03:55:20 +0000
602@@ -1,26 +1,25 @@
603 #!/usr/bin/python
604-
605 import traceback, sys
606-import libaccomplishments
607+
608+from accomplishments.daemon import dbusapi
609+
610
611 try:
612 import json, sys, os, pwd, subprocess
613 from ubuntuone.couch import auth
614 from launchpadlib.launchpad import Launchpad
615
616- libaccom = libaccomplishments.Accomplishments()
617-
618- f = libaccom.getExtraInformation("ubuntu-community", "launchpad-email")
619-
620+ api = dbusapi.Accomplishments()
621+ f = api.getExtraInformation("ubuntu-community", "launchpad-email")
622 if bool(f[0]["launchpad-email"]) == False:
623 sys.exit(4)
624 else:
625 email = f[0]["launchpad-email"]
626-
627- # Get count of bugs reported by user from Launchpad, using email to identify
628- l=Launchpad.login_anonymously('ubuntu-community accomplishments','production')
629- me=l.people.getByEmail(email=email)
630-
631+ # Get count of bugs reported by user from Launchpad, using email to
632+ # identify
633+ l = Launchpad.login_anonymously(
634+ 'ubuntu-community accomplishments', 'production')
635+ me = l.people.getByEmail(email=email)
636 if me == None:
637 sys.exit(1)
638 else:
639@@ -31,4 +30,3 @@
640 except:
641 traceback.print_exc()
642 sys.exit(2)
643-
644
645=== modified file 'scripts/ubuntu-community/signed-code-of-conduct.py'
646--- scripts/ubuntu-community/signed-code-of-conduct.py 2012-02-23 23:42:28 +0000
647+++ scripts/ubuntu-community/signed-code-of-conduct.py 2012-03-05 03:55:20 +0000
648@@ -1,25 +1,23 @@
649 #!/usr/bin/python
650-
651 import traceback, sys
652-import libaccomplishments
653+
654+from accomplishments.daemon import dbusapi
655+
656
657 try:
658 import json, sys, os, pwd, subprocess
659 from ubuntuone.couch import auth
660 from launchpadlib.launchpad import Launchpad
661
662- libaccom = libaccomplishments.Accomplishments()
663-
664- f = libaccom.getExtraInformation("ubuntu-community", "launchpad-email")
665-
666+ api = dbusapi.Accomplishments()
667+ f = api.getExtraInformation("ubuntu-community", "launchpad-email")
668 if bool(f[0]["launchpad-email"]) == False:
669 sys.exit(4)
670 else:
671 email = f[0]["launchpad-email"]
672-
673- lp=Launchpad.login_anonymously('ubuntu-community accomplishments','production')
674- me=lp.people.getByEmail(email=email)
675-
676+ lp = Launchpad.login_anonymously(
677+ 'ubuntu-community accomplishments', 'production')
678+ me = lp.people.getByEmail(email=email)
679 if me == None:
680 sys.exit(1)
681 else:
682@@ -33,4 +31,3 @@
683 except:
684 traceback.print_exc()
685 sys.exit(2)
686-
687
688=== modified file 'scripts/ubuntu-community/technical-board-member.py'
689--- scripts/ubuntu-community/technical-board-member.py 2012-02-24 00:08:50 +0000
690+++ scripts/ubuntu-community/technical-board-member.py 2012-03-05 03:55:20 +0000
691@@ -1,35 +1,30 @@
692 #!/usr/bin/python
693-
694 import traceback, sys
695-import libaccomplishments
696+
697+from accomplishments.daemon import dbusapi
698+
699
700 try:
701 import json, sys, os, pwd, subprocess
702 from ubuntuone.couch import auth
703 from launchpadlib.launchpad import Launchpad
704
705- libaccom = libaccomplishments.Accomplishments()
706-
707- f = libaccom.getExtraInformation("ubuntu-community", "launchpad-email")
708-
709+ api = dbusapi.Accomplishments()
710+ f = api.getExtraInformation("ubuntu-community", "launchpad-email")
711 if bool(f[0]["launchpad-email"]) == False:
712 sys.exit(4)
713 else:
714 email = f[0]["launchpad-email"]
715-
716- lp=Launchpad.login_anonymously('ubuntu-community accomplishments','production')
717- me=lp.people.getByEmail(email=email)
718-
719+ lp = Launchpad.login_anonymously(
720+ 'ubuntu-community accomplishments', 'production')
721+ me = lp.people.getByEmail(email=email)
722 if me == None:
723 sys.exit(1)
724 else:
725 user = me.name
726-
727 teams = [team.name for team in lp.people['techboard'].sub_teams]
728-
729 if teams == []:
730 teams.append(lp.people['techboard'].name)
731-
732 try:
733 memberships = [
734 membership for membership in
735@@ -38,7 +33,6 @@
736 ['techboard'] + teams]
737 except KeyError:
738 memberships = []
739-
740 if memberships:
741 sys.exit(0)
742 else:
743@@ -49,4 +43,3 @@
744 except:
745 traceback.print_exc()
746 sys.exit(2)
747-
748
749=== modified file 'scripts/ubuntu-community/ubuntu-member.py'
750--- scripts/ubuntu-community/ubuntu-member.py 2012-02-21 03:39:06 +0000
751+++ scripts/ubuntu-community/ubuntu-member.py 2012-03-05 03:55:20 +0000
752@@ -1,35 +1,30 @@
753 #!/usr/bin/python
754-
755 import traceback, sys
756-import libaccomplishments
757+
758+from accomplishments.daemon import dbusapi
759+
760
761 try:
762 import json, sys, os, pwd, subprocess
763 from ubuntuone.couch import auth
764 from launchpadlib.launchpad import Launchpad
765
766- libaccom = libaccomplishments.Accomplishments()
767-
768- f = libaccom.getExtraInformation("ubuntu-community", "launchpad-email")
769-
770+ api = dbusapi.Accomplishments()
771+ f = api.getExtraInformation("ubuntu-community", "launchpad-email")
772 if bool(f[0]["launchpad-email"]) == False:
773 sys.exit(4)
774 else:
775 email = f[0]["launchpad-email"]
776-
777- lp=Launchpad.login_anonymously('ubuntu-community accomplishments','production')
778- me=lp.people.getByEmail(email=email)
779-
780+ lp = Launchpad.login_anonymously(
781+ 'ubuntu-community accomplishments', 'production')
782+ me = lp.people.getByEmail(email=email)
783 if me == None:
784 sys.exit(1)
785 else:
786 user = me.name
787-
788 teams = [team.name for team in lp.people['ubuntumembers'].sub_teams]
789-
790 if teams == []:
791 teams.append(lp.people['ubuntumembers'].name)
792-
793 try:
794 memberships = [
795 membership for membership in
796@@ -38,7 +33,6 @@
797 ['ubuntumembers'] + teams]
798 except KeyError:
799 memberships = []
800-
801 if memberships:
802 sys.exit(0)
803 else:
804@@ -49,4 +43,3 @@
805 except:
806 traceback.print_exc()
807 sys.exit(2)
808-

Subscribers

People subscribed via source and target branches

to all changes: