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
=== modified file 'scripts/ubuntu-community/community-council-member.py'
--- scripts/ubuntu-community/community-council-member.py 2012-02-24 00:08:50 +0000
+++ scripts/ubuntu-community/community-council-member.py 2012-03-05 03:55:20 +0000
@@ -1,35 +1,32 @@
1#!/usr/bin/python1#!/usr/bin/python
2
3import traceback, sys2import traceback, sys
4import libaccomplishments3
4from accomplishments.daemon import dbusapi
5
56
6try:7try:
7 import json, sys, os, pwd, subprocess8 import json, sys, os, pwd, subprocess
8 from ubuntuone.couch import auth9 from ubuntuone.couch import auth
9 from launchpadlib.launchpad import Launchpad10 from launchpadlib.launchpad import Launchpad
1011
11 libaccom = libaccomplishments.Accomplishments()12 api = dbusapi.Accomplishments()
1213 f = api.getExtraInformation("ubuntu-community", "launchpad-email")
13 f = libaccom.getExtraInformation("ubuntu-community", "launchpad-email")
14
15 if bool(f[0]["launchpad-email"]) == False:14 if bool(f[0]["launchpad-email"]) == False:
16 sys.exit(4)15 sys.exit(4)
17 else:16 else:
18 email = f[0]["launchpad-email"]17 email = f[0]["launchpad-email"]
1918
20 lp=Launchpad.login_anonymously('ubuntu-community accomplishments','production')19 lp = Launchpad.login_anonymously(
21 me=lp.people.getByEmail(email=email)20 'ubuntu-community accomplishments', 'production')
21 me = lp.people.getByEmail(email=email)
2222
23 if me == None:23 if me == None:
24 sys.exit(1)24 sys.exit(1)
25 else:25 else:
26 user = me.name26 user = me.name
27
28 teams = [team.name for team in lp.people['communitycouncil'].sub_teams]27 teams = [team.name for team in lp.people['communitycouncil'].sub_teams]
29
30 if teams == []:28 if teams == []:
31 teams.append(lp.people['communitycouncil'].name)29 teams.append(lp.people['communitycouncil'].name)
32
33 try:30 try:
34 memberships = [31 memberships = [
35 membership for membership in32 membership for membership in
@@ -38,7 +35,6 @@
38 ['communitycouncil'] + teams]35 ['communitycouncil'] + teams]
39 except KeyError:36 except KeyError:
40 memberships = []37 memberships = []
41
42 if memberships:38 if memberships:
43 sys.exit(0)39 sys.exit(0)
44 else:40 else:
@@ -49,4 +45,3 @@
49except:45except:
50 traceback.print_exc()46 traceback.print_exc()
51 sys.exit(2)47 sys.exit(2)
52
5348
=== modified file 'scripts/ubuntu-community/core-dev.py'
--- scripts/ubuntu-community/core-dev.py 2012-02-21 03:39:06 +0000
+++ scripts/ubuntu-community/core-dev.py 2012-03-05 03:55:20 +0000
@@ -1,35 +1,32 @@
1#!/usr/bin/python1#!/usr/bin/python
2
3import traceback, sys2import traceback, sys
4import libaccomplishments3
4from accomplishments.daemon import dbusapi
5
56
6try:7try:
7 import json, sys, os, pwd, subprocess8 import json, sys, os, pwd, subprocess
8 from ubuntuone.couch import auth9 from ubuntuone.couch import auth
9 from launchpadlib.launchpad import Launchpad10 from launchpadlib.launchpad import Launchpad
1011
11 libaccom = libaccomplishments.Accomplishments()12 api = dbusapi.Accomplishments()
1213 f = api.getExtraInformation("ubuntu-community", "launchpad-email")
13 f = libaccom.getExtraInformation("ubuntu-community", "launchpad-email")
14
15 if bool(f[0]["launchpad-email"]) == False:14 if bool(f[0]["launchpad-email"]) == False:
16 sys.exit(4)15 sys.exit(4)
17 else:16 else:
18 email = f[0]["launchpad-email"]17 email = f[0]["launchpad-email"]
1918
20 lp=Launchpad.login_anonymously('ubuntu-community accomplishments','production')19 lp = Launchpad.login_anonymously(
21 me=lp.people.getByEmail(email=email)20 'ubuntu-community accomplishments', 'production')
21 me = lp.people.getByEmail(email=email)
2222
23 if me == None:23 if me == None:
24 sys.exit(1)24 sys.exit(1)
25 else:25 else:
26 user = me.name26 user = me.name
27
28 teams = [team.name for team in lp.people['ubuntu-core-dev'].sub_teams]27 teams = [team.name for team in lp.people['ubuntu-core-dev'].sub_teams]
29
30 if teams == []:28 if teams == []:
31 teams.append(lp.people['ubuntu-core-dev'].name)29 teams.append(lp.people['ubuntu-core-dev'].name)
32
33 try:30 try:
34 memberships = [31 memberships = [
35 membership for membership in32 membership for membership in
@@ -38,7 +35,6 @@
38 ['ubuntu-core-dev'] + teams]35 ['ubuntu-core-dev'] + teams]
39 except KeyError:36 except KeyError:
40 memberships = []37 memberships = []
41
42 if memberships:38 if memberships:
43 sys.exit(0)39 sys.exit(0)
44 else:40 else:
@@ -49,4 +45,3 @@
49except:45except:
50 traceback.print_exc()46 traceback.print_exc()
51 sys.exit(2)47 sys.exit(2)
52
5348
=== modified file 'scripts/ubuntu-community/first-bug-confirmed.py'
--- scripts/ubuntu-community/first-bug-confirmed.py 2012-03-02 14:14:47 +0000
+++ scripts/ubuntu-community/first-bug-confirmed.py 2012-03-05 03:55:20 +0000
@@ -1,34 +1,33 @@
1#!/usr/bin/python1#!/usr/bin/python
2
3import traceback, sys2import traceback, sys
4import libaccomplishments3
4from accomplishments.daemon import dbusapi
5
56
6try:7try:
7 import json, sys, os, pwd, subprocess8 import json, sys, os, pwd, subprocess
8 from ubuntuone.couch import auth9 from ubuntuone.couch import auth
9 from launchpadlib.launchpad import Launchpad10 from launchpadlib.launchpad import Launchpad
1011
11 libaccom = libaccomplishments.Accomplishments()12 api = dbusapi.Accomplishments()
1213 f = api.getExtraInformation("ubuntu-community", "launchpad-email")
13 f = libaccom.getExtraInformation("ubuntu-community", "launchpad-email")
14
15 if bool(f[0]["launchpad-email"]) == False:14 if bool(f[0]["launchpad-email"]) == False:
16 sys.exit(4)15 sys.exit(4)
17 else:16 else:
18 email = f[0]["launchpad-email"]17 email = f[0]["launchpad-email"]
1918
20 # Get count of bugs reported by user from Launchpad, using email to identify19 # Get count of bugs reported by user from Launchpad, using email to
21 l=Launchpad.login_anonymously('ubuntu-community accomplishments','production')20 # identify
22 me=l.people.getByEmail(email=email)21 l = Launchpad.login_anonymously(
2322 'ubuntu-community accomplishments', 'production')
23 me = l.people.getByEmail(email=email)
24 if me == None:24 if me == None:
25 sys.exit(1)25 sys.exit(1)
26 else:26 else:
27 ubuntu=l.projects['ubuntu']27 ubuntu=l.projects['ubuntu']
28 bugs_reported = ubuntu.searchTasks(bug_reporter=me, 28 bugs_reported = ubuntu.searchTasks(bug_reporter=me,
29 status=['Confirmed', 'Triaged', 29 status=['Confirmed', 'Triaged', 'In Progress', 'Fix Committed',
30 'In Progress', 'Fix Committed', 'Fix Released'])30 'Fix Released'])
31
32 if len(bugs_reported) > 0:31 if len(bugs_reported) > 0:
33 sys.exit(0)32 sys.exit(0)
34 else:33 else:
@@ -39,4 +38,3 @@
39except:38except:
40 traceback.print_exc()39 traceback.print_exc()
41 sys.exit(2)40 sys.exit(2)
42
4341
=== modified file 'scripts/ubuntu-community/first-bug.py'
--- scripts/ubuntu-community/first-bug.py 2012-02-18 00:01:46 +0000
+++ scripts/ubuntu-community/first-bug.py 2012-03-05 03:55:20 +0000
@@ -1,34 +1,34 @@
1#!/usr/bin/python1#!/usr/bin/python
2
3import traceback, sys2import traceback, sys
4import libaccomplishments3
4from accomplishments.daemon import dbusapi
5
56
6try:7try:
7 import json, sys, os, pwd, subprocess8 import json, sys, os, pwd, subprocess
8 from ubuntuone.couch import auth9 from ubuntuone.couch import auth
9 from launchpadlib.launchpad import Launchpad10 from launchpadlib.launchpad import Launchpad
1011
11 libaccom = libaccomplishments.Accomplishments()12 api = dbusapi.Accomplishments()
1213 f = api.getExtraInformation("ubuntu-community", "launchpad-email")
13 f = libaccom.getExtraInformation("ubuntu-community", "launchpad-email")
14
15 if bool(f[0]["launchpad-email"]) == False:14 if bool(f[0]["launchpad-email"]) == False:
16 sys.exit(4)15 sys.exit(4)
17 else:16 else:
18 email = f[0]["launchpad-email"]17 email = f[0]["launchpad-email"]
1918
20 # Get count of bugs reported by user from Launchpad, using email to identify19 # Get count of bugs reported by user from Launchpad, using email to
21 l=Launchpad.login_anonymously('ubuntu-community accomplishments','production')20 # identify
22 me=l.people.getByEmail(email=email)21 l = Launchpad.login_anonymously(
2322 'ubuntu-community accomplishments', 'production')
23 me = l.people.getByEmail(email=email)
24 if me == None:24 if me == None:
25 sys.exit(1)25 sys.exit(1)
26 else:26 else:
27 ubuntu=l.projects['ubuntu']27 ubuntu=l.projects['ubuntu']
28 bugs_reported = ubuntu.searchTasks(bug_reporter=me, 28 bugs_reported = ubuntu.searchTasks(bug_reporter=me,
29 status=['New', 'Incomplete', 'Invalid', 'Confirmed', 'Triaged', 29 status=['New', 'Incomplete', 'Invalid', 'Confirmed', 'Triaged',
30 'In Progress', 'Fix Committed', 'Fix Released', 'Opinion', "Won't Fix"])30 'In Progress', 'Fix Committed', 'Fix Released', 'Opinion',
3131 "Won't Fix"])
32 if len(bugs_reported) > 0:32 if len(bugs_reported) > 0:
33 sys.exit(0)33 sys.exit(0)
34 else:34 else:
@@ -39,4 +39,3 @@
39except:39except:
40 traceback.print_exc()40 traceback.print_exc()
41 sys.exit(2)41 sys.exit(2)
42
4342
=== modified file 'scripts/ubuntu-community/fridge-editor.py'
--- scripts/ubuntu-community/fridge-editor.py 2012-02-22 01:10:42 +0000
+++ scripts/ubuntu-community/fridge-editor.py 2012-03-05 03:55:20 +0000
@@ -1,35 +1,31 @@
1#!/usr/bin/python1#!/usr/bin/python
2
3import traceback, sys2import traceback, sys
4import libaccomplishments3
4from accomplishments.daemon import dbusapi
5
56
6try:7try:
7 import json, sys, os, pwd, subprocess8 import json, sys, os, pwd, subprocess
8 from ubuntuone.couch import auth9 from ubuntuone.couch import auth
9 from launchpadlib.launchpad import Launchpad10 from launchpadlib.launchpad import Launchpad
1011
11 libaccom = libaccomplishments.Accomplishments()12 api = dbusapi.Accomplishments()
1213 f = api.getExtraInformation("ubuntu-community", "launchpad-email")
13 f = libaccom.getExtraInformation("ubuntu-community", "launchpad-email")
14
15 if bool(f[0]["launchpad-email"]) == False:14 if bool(f[0]["launchpad-email"]) == False:
16 sys.exit(4)15 sys.exit(4)
17 else:16 else:
18 email = f[0]["launchpad-email"]17 email = f[0]["launchpad-email"]
1918
20 lp=Launchpad.login_anonymously('ubuntu-community accomplishments','production')19 lp = Launchpad.login_anonymously(
21 me=lp.people.getByEmail(email=email)20 'ubuntu-community accomplishments', 'production')
2221 me = lp.people.getByEmail(email=email)
23 if me == None:22 if me == None:
24 sys.exit(1)23 sys.exit(1)
25 else:24 else:
26 user = me.name25 user = me.name
27
28 teams = [team.name for team in lp.people['ubuntu-fridge'].sub_teams]26 teams = [team.name for team in lp.people['ubuntu-fridge'].sub_teams]
29
30 if teams == []:27 if teams == []:
31 teams.append(lp.people['ubuntu-fridge'].name)28 teams.append(lp.people['ubuntu-fridge'].name)
32
33 try:29 try:
34 memberships = [30 memberships = [
35 membership for membership in31 membership for membership in
@@ -38,7 +34,6 @@
38 ['ubuntu-fridge'] + teams]34 ['ubuntu-fridge'] + teams]
39 except KeyError:35 except KeyError:
40 memberships = []36 memberships = []
41
42 if memberships:37 if memberships:
43 sys.exit(0)38 sys.exit(0)
44 else:39 else:
@@ -49,4 +44,3 @@
49except:44except:
50 traceback.print_exc()45 traceback.print_exc()
51 sys.exit(2)46 sys.exit(2)
52
5347
=== modified file 'scripts/ubuntu-community/juju-charm-contributor.py'
--- scripts/ubuntu-community/juju-charm-contributor.py 2012-02-21 03:39:06 +0000
+++ scripts/ubuntu-community/juju-charm-contributor.py 2012-03-05 03:55:20 +0000
@@ -1,35 +1,32 @@
1#!/usr/bin/python1#!/usr/bin/python
2
3import traceback, sys2import traceback, sys
4import libaccomplishments3
4from accomplishments.daemon import dbusapi
5
56
6try:7try:
7 import json, sys, os, pwd, subprocess8 import json, sys, os, pwd, subprocess
8 from ubuntuone.couch import auth9 from ubuntuone.couch import auth
9 from launchpadlib.launchpad import Launchpad10 from launchpadlib.launchpad import Launchpad
1011
11 libaccom = libaccomplishments.Accomplishments()12 api = dbusapi.Accomplishments()
1213 f = api.getExtraInformation("ubuntu-community", "launchpad-email")
13 f = libaccom.getExtraInformation("ubuntu-community", "launchpad-email")
14
15 if bool(f[0]["launchpad-email"]) == False:14 if bool(f[0]["launchpad-email"]) == False:
16 sys.exit(4)15 sys.exit(4)
17 else:16 else:
18 email = f[0]["launchpad-email"]17 email = f[0]["launchpad-email"]
1918
20 lp=Launchpad.login_anonymously('ubuntu-community accomplishments','production')19 lp = Launchpad.login_anonymously(
21 me=lp.people.getByEmail(email=email)20 'ubuntu-community accomplishments', 'production')
2221 me = lp.people.getByEmail(email=email)
23 if me == None:22 if me == None:
24 sys.exit(1)23 sys.exit(1)
25 else:24 else:
26 user = me.name25 user = me.name
2726 teams = [team.name for team in
28 teams = [team.name for team in lp.people['charm-contributors'].sub_teams]27 lp.people['charm-contributors'].sub_teams]
29
30 if teams == []:28 if teams == []:
31 teams.append(lp.people['charm-contributors'].name)29 teams.append(lp.people['charm-contributors'].name)
32
33 try:30 try:
34 memberships = [31 memberships = [
35 membership for membership in32 membership for membership in
@@ -38,7 +35,6 @@
38 ['charm-contributors'] + teams]35 ['charm-contributors'] + teams]
39 except KeyError:36 except KeyError:
40 memberships = []37 memberships = []
41
42 if memberships:38 if memberships:
43 sys.exit(0)39 sys.exit(0)
44 else:40 else:
@@ -49,4 +45,3 @@
49except:45except:
50 traceback.print_exc()46 traceback.print_exc()
51 sys.exit(2)47 sys.exit(2)
52
5348
=== modified file 'scripts/ubuntu-community/juju-charm-reviewer.py'
--- scripts/ubuntu-community/juju-charm-reviewer.py 2012-02-21 03:39:06 +0000
+++ scripts/ubuntu-community/juju-charm-reviewer.py 2012-03-05 03:55:20 +0000
@@ -1,35 +1,30 @@
1#!/usr/bin/python1#!/usr/bin/python
2
3import traceback, sys2import traceback, sys
4import libaccomplishments3
4from accomplishments.daemon import dbusapi
5
56
6try:7try:
7 import json, sys, os, pwd, subprocess8 import json, sys, os, pwd, subprocess
8 from ubuntuone.couch import auth9 from ubuntuone.couch import auth
9 from launchpadlib.launchpad import Launchpad10 from launchpadlib.launchpad import Launchpad
1011
11 libaccom = libaccomplishments.Accomplishments()12 api = dbusapi.Accomplishments()
1213 f = api.getExtraInformation("ubuntu-community", "launchpad-email")
13 f = libaccom.getExtraInformation("ubuntu-community", "launchpad-email")
14
15 if bool(f[0]["launchpad-email"]) == False:14 if bool(f[0]["launchpad-email"]) == False:
16 sys.exit(4)15 sys.exit(4)
17 else:16 else:
18 email = f[0]["launchpad-email"]17 email = f[0]["launchpad-email"]
1918 lp = Launchpad.login_anonymously(
20 lp=Launchpad.login_anonymously('ubuntu-community accomplishments','production')19 'ubuntu-community accomplishments', 'production')
21 me=lp.people.getByEmail(email=email)20 me = lp.people.getByEmail(email=email)
22
23 if me == None:21 if me == None:
24 sys.exit(1)22 sys.exit(1)
25 else:23 else:
26 user = me.name24 user = me.name
27
28 teams = [team.name for team in lp.people['charmers'].sub_teams]25 teams = [team.name for team in lp.people['charmers'].sub_teams]
29
30 if teams == []:26 if teams == []:
31 teams.append(lp.people['charmers'].name)27 teams.append(lp.people['charmers'].name)
32
33 try:28 try:
34 memberships = [29 memberships = [
35 membership for membership in30 membership for membership in
@@ -38,7 +33,6 @@
38 ['charmers'] + teams]33 ['charmers'] + teams]
39 except KeyError:34 except KeyError:
40 memberships = []35 memberships = []
41
42 if memberships:36 if memberships:
43 sys.exit(0)37 sys.exit(0)
44 else:38 else:
@@ -49,4 +43,3 @@
49except:43except:
50 traceback.print_exc()44 traceback.print_exc()
51 sys.exit(2)45 sys.exit(2)
52
5346
=== modified file 'scripts/ubuntu-community/loco-council-member.py'
--- scripts/ubuntu-community/loco-council-member.py 2012-02-24 00:08:50 +0000
+++ scripts/ubuntu-community/loco-council-member.py 2012-03-05 03:55:20 +0000
@@ -1,35 +1,31 @@
1#!/usr/bin/python1#!/usr/bin/python
2
3import traceback, sys2import traceback, sys
4import libaccomplishments3
4from accomplishments.daemon import dbusapi
5
56
6try:7try:
7 import json, sys, os, pwd, subprocess8 import json, sys, os, pwd, subprocess
8 from ubuntuone.couch import auth9 from ubuntuone.couch import auth
9 from launchpadlib.launchpad import Launchpad10 from launchpadlib.launchpad import Launchpad
1011
11 libaccom = libaccomplishments.Accomplishments()12 api = dbusapi.Accomplishments()
1213 f = api.getExtraInformation("ubuntu-community", "launchpad-email")
13 f = libaccom.getExtraInformation("ubuntu-community", "launchpad-email")
14
15 if bool(f[0]["launchpad-email"]) == False:14 if bool(f[0]["launchpad-email"]) == False:
16 sys.exit(4)15 sys.exit(4)
17 else:16 else:
18 email = f[0]["launchpad-email"]17 email = f[0]["launchpad-email"]
1918 lp = Launchpad.login_anonymously(
20 lp=Launchpad.login_anonymously('ubuntu-community accomplishments','production')19 'ubuntu-community accomplishments', 'production')
21 me=lp.people.getByEmail(email=email)20 me = lp.people.getByEmail(email=email)
22
23 if me == None:21 if me == None:
24 sys.exit(1)22 sys.exit(1)
25 else:23 else:
26 user = me.name24 user = me.name
2725 teams = [team.name for team in
28 teams = [team.name for team in lp.people['ubuntu-lococouncil'].sub_teams]26 lp.people['ubuntu-lococouncil'].sub_teams]
29
30 if teams == []:27 if teams == []:
31 teams.append(lp.people['ubuntu-lococouncil'].name)28 teams.append(lp.people['ubuntu-lococouncil'].name)
32
33 try:29 try:
34 memberships = [30 memberships = [
35 membership for membership in31 membership for membership in
@@ -38,7 +34,6 @@
38 ['ubuntu-lococouncil'] + teams]34 ['ubuntu-lococouncil'] + teams]
39 except KeyError:35 except KeyError:
40 memberships = []36 memberships = []
41
42 if memberships:37 if memberships:
43 sys.exit(0)38 sys.exit(0)
44 else:39 else:
@@ -49,4 +44,3 @@
49except:44except:
50 traceback.print_exc()45 traceback.print_exc()
51 sys.exit(2)46 sys.exit(2)
52
5347
=== modified file 'scripts/ubuntu-community/member-loco-team.py'
--- scripts/ubuntu-community/member-loco-team.py 2012-02-23 06:57:16 +0000
+++ scripts/ubuntu-community/member-loco-team.py 2012-03-05 03:55:20 +0000
@@ -1,25 +1,23 @@
1#!/usr/bin/python1#!/usr/bin/python
2
3import traceback, sys2import traceback, sys
4import libaccomplishments3
4from accomplishments.daemon import dbusapi
5
56
6try:7try:
7 import json, sys, os, pwd, subprocess8 import json, sys, os, pwd, subprocess
8 from ubuntuone.couch import auth9 from ubuntuone.couch import auth
9 from launchpadlib.launchpad import Launchpad10 from launchpadlib.launchpad import Launchpad
1011
11 libaccom = libaccomplishments.Accomplishments()12 api = dbusapi.Accomplishments()
1213 f = api.getExtraInformation("ubuntu-community", "launchpad-email")
13 f = libaccom.getExtraInformation("ubuntu-community", "launchpad-email")
14
15 if bool(f[0]["launchpad-email"]) == False:14 if bool(f[0]["launchpad-email"]) == False:
16 sys.exit(2)15 sys.exit(2)
17 else:16 else:
18 email = f[0]["launchpad-email"]17 email = f[0]["launchpad-email"]
1918 lp = Launchpad.login_anonymously(
20 lp=Launchpad.login_anonymously('ubuntu-community accomplishments','production')19 'ubuntu-community accomplishments', 'production')
21 me=lp.people.getByEmail(email=email)20 me = lp.people.getByEmail(email=email)
22
23 if me == None:21 if me == None:
24 sys.exit(1)22 sys.exit(1)
25 else:23 else:
@@ -29,15 +27,13 @@
29 for sup in team.super_teams:27 for sup in team.super_teams:
30 if "locoteams" in sup.self_link.rsplit('~', 1)[-1]:28 if "locoteams" in sup.self_link.rsplit('~', 1)[-1]:
31 final.append(sup)29 final.append(sup)
32
33 if len(final) is not 0:30 if len(final) is not 0:
34 sys.exit(0)31 sys.exit(0)
35 else:32 else:
36 sys.exit(1)33 sys.exit(1)
37 34
38except SystemExit, e:35except SystemExit, e:
39 sys.exit(e.code)36 sys.exit(e.code)
40except:37except:
41 traceback.print_exc()38 traceback.print_exc()
42 sys.exit(2)39 sys.exit(2)
43
4440
=== modified file 'scripts/ubuntu-community/motu.py'
--- scripts/ubuntu-community/motu.py 2012-02-21 03:39:06 +0000
+++ scripts/ubuntu-community/motu.py 2012-03-05 03:55:20 +0000
@@ -1,35 +1,30 @@
1#!/usr/bin/python1#!/usr/bin/python
2
3import traceback, sys2import traceback, sys
4import libaccomplishments3
4from accomplishments.daemon import dbusapi
5
56
6try:7try:
7 import json, sys, os, pwd, subprocess8 import json, sys, os, pwd, subprocess
8 from ubuntuone.couch import auth9 from ubuntuone.couch import auth
9 from launchpadlib.launchpad import Launchpad10 from launchpadlib.launchpad import Launchpad
1011
11 libaccom = libaccomplishments.Accomplishments()12 api = dbusapi.Accomplishments()
1213 f = api.getExtraInformation("ubuntu-community", "launchpad-email")
13 f = libaccom.getExtraInformation("ubuntu-community", "launchpad-email")
14
15 if bool(f[0]["launchpad-email"]) == False:14 if bool(f[0]["launchpad-email"]) == False:
16 sys.exit(4)15 sys.exit(4)
17 else:16 else:
18 email = f[0]["launchpad-email"]17 email = f[0]["launchpad-email"]
1918 lp = Launchpad.login_anonymously(
20 lp=Launchpad.login_anonymously('ubuntu-community accomplishments','production')19 'ubuntu-community accomplishments', 'production')
21 me=lp.people.getByEmail(email=email)20 me = lp.people.getByEmail(email=email)
22
23 if me == None:21 if me == None:
24 sys.exit(1)22 sys.exit(1)
25 else:23 else:
26 user = me.name24 user = me.name
27
28 teams = [team.name for team in lp.people['motu'].sub_teams]25 teams = [team.name for team in lp.people['motu'].sub_teams]
29
30 if teams == []:26 if teams == []:
31 teams.append(lp.people['motu'].name)27 teams.append(lp.people['motu'].name)
32
33 try:28 try:
34 memberships = [29 memberships = [
35 membership for membership in30 membership for membership in
@@ -38,7 +33,6 @@
38 ['motu'] + teams]33 ['motu'] + teams]
39 except KeyError:34 except KeyError:
40 memberships = []35 memberships = []
41
42 if memberships:36 if memberships:
43 sys.exit(0)37 sys.exit(0)
44 else:38 else:
@@ -49,4 +43,3 @@
49except:43except:
50 traceback.print_exc()44 traceback.print_exc()
51 sys.exit(2)45 sys.exit(2)
52
5346
=== modified file 'scripts/ubuntu-community/registered-on-launchpad.py'
--- scripts/ubuntu-community/registered-on-launchpad.py 2012-02-15 22:14:37 +0000
+++ scripts/ubuntu-community/registered-on-launchpad.py 2012-03-05 03:55:20 +0000
@@ -1,26 +1,25 @@
1#!/usr/bin/python1#!/usr/bin/python
2
3import traceback, sys2import traceback, sys
4import libaccomplishments3
4from accomplishments.daemon import dbusapi
5
56
6try:7try:
7 import json, sys, os, pwd, subprocess8 import json, sys, os, pwd, subprocess
8 from ubuntuone.couch import auth9 from ubuntuone.couch import auth
9 from launchpadlib.launchpad import Launchpad10 from launchpadlib.launchpad import Launchpad
1011
11 libaccom = libaccomplishments.Accomplishments()12 api = dbusapi.Accomplishments()
1213 f = api.getExtraInformation("ubuntu-community", "launchpad-email")
13 f = libaccom.getExtraInformation("ubuntu-community", "launchpad-email")
14
15 if bool(f[0]["launchpad-email"]) == False:14 if bool(f[0]["launchpad-email"]) == False:
16 sys.exit(4)15 sys.exit(4)
17 else:16 else:
18 email = f[0]["launchpad-email"]17 email = f[0]["launchpad-email"]
1918 # Get count of bugs reported by user from Launchpad, using email to
20 # Get count of bugs reported by user from Launchpad, using email to identify19 # identify
21 l=Launchpad.login_anonymously('ubuntu-community accomplishments','production')20 l = Launchpad.login_anonymously(
22 me=l.people.getByEmail(email=email)21 'ubuntu-community accomplishments', 'production')
2322 me = l.people.getByEmail(email=email)
24 if me == None:23 if me == None:
25 sys.exit(1)24 sys.exit(1)
26 else:25 else:
@@ -31,4 +30,3 @@
31except:30except:
32 traceback.print_exc()31 traceback.print_exc()
33 sys.exit(2)32 sys.exit(2)
34
3533
=== modified file 'scripts/ubuntu-community/signed-code-of-conduct.py'
--- scripts/ubuntu-community/signed-code-of-conduct.py 2012-02-23 23:42:28 +0000
+++ scripts/ubuntu-community/signed-code-of-conduct.py 2012-03-05 03:55:20 +0000
@@ -1,25 +1,23 @@
1#!/usr/bin/python1#!/usr/bin/python
2
3import traceback, sys2import traceback, sys
4import libaccomplishments3
4from accomplishments.daemon import dbusapi
5
56
6try:7try:
7 import json, sys, os, pwd, subprocess8 import json, sys, os, pwd, subprocess
8 from ubuntuone.couch import auth9 from ubuntuone.couch import auth
9 from launchpadlib.launchpad import Launchpad10 from launchpadlib.launchpad import Launchpad
1011
11 libaccom = libaccomplishments.Accomplishments()12 api = dbusapi.Accomplishments()
1213 f = api.getExtraInformation("ubuntu-community", "launchpad-email")
13 f = libaccom.getExtraInformation("ubuntu-community", "launchpad-email")
14
15 if bool(f[0]["launchpad-email"]) == False:14 if bool(f[0]["launchpad-email"]) == False:
16 sys.exit(4)15 sys.exit(4)
17 else:16 else:
18 email = f[0]["launchpad-email"]17 email = f[0]["launchpad-email"]
1918 lp = Launchpad.login_anonymously(
20 lp=Launchpad.login_anonymously('ubuntu-community accomplishments','production')19 'ubuntu-community accomplishments', 'production')
21 me=lp.people.getByEmail(email=email)20 me = lp.people.getByEmail(email=email)
22
23 if me == None:21 if me == None:
24 sys.exit(1)22 sys.exit(1)
25 else:23 else:
@@ -33,4 +31,3 @@
33except:31except:
34 traceback.print_exc()32 traceback.print_exc()
35 sys.exit(2)33 sys.exit(2)
36
3734
=== modified file 'scripts/ubuntu-community/technical-board-member.py'
--- scripts/ubuntu-community/technical-board-member.py 2012-02-24 00:08:50 +0000
+++ scripts/ubuntu-community/technical-board-member.py 2012-03-05 03:55:20 +0000
@@ -1,35 +1,30 @@
1#!/usr/bin/python1#!/usr/bin/python
2
3import traceback, sys2import traceback, sys
4import libaccomplishments3
4from accomplishments.daemon import dbusapi
5
56
6try:7try:
7 import json, sys, os, pwd, subprocess8 import json, sys, os, pwd, subprocess
8 from ubuntuone.couch import auth9 from ubuntuone.couch import auth
9 from launchpadlib.launchpad import Launchpad10 from launchpadlib.launchpad import Launchpad
1011
11 libaccom = libaccomplishments.Accomplishments()12 api = dbusapi.Accomplishments()
1213 f = api.getExtraInformation("ubuntu-community", "launchpad-email")
13 f = libaccom.getExtraInformation("ubuntu-community", "launchpad-email")
14
15 if bool(f[0]["launchpad-email"]) == False:14 if bool(f[0]["launchpad-email"]) == False:
16 sys.exit(4)15 sys.exit(4)
17 else:16 else:
18 email = f[0]["launchpad-email"]17 email = f[0]["launchpad-email"]
1918 lp = Launchpad.login_anonymously(
20 lp=Launchpad.login_anonymously('ubuntu-community accomplishments','production')19 'ubuntu-community accomplishments', 'production')
21 me=lp.people.getByEmail(email=email)20 me = lp.people.getByEmail(email=email)
22
23 if me == None:21 if me == None:
24 sys.exit(1)22 sys.exit(1)
25 else:23 else:
26 user = me.name24 user = me.name
27
28 teams = [team.name for team in lp.people['techboard'].sub_teams]25 teams = [team.name for team in lp.people['techboard'].sub_teams]
29
30 if teams == []:26 if teams == []:
31 teams.append(lp.people['techboard'].name)27 teams.append(lp.people['techboard'].name)
32
33 try:28 try:
34 memberships = [29 memberships = [
35 membership for membership in30 membership for membership in
@@ -38,7 +33,6 @@
38 ['techboard'] + teams]33 ['techboard'] + teams]
39 except KeyError:34 except KeyError:
40 memberships = []35 memberships = []
41
42 if memberships:36 if memberships:
43 sys.exit(0)37 sys.exit(0)
44 else:38 else:
@@ -49,4 +43,3 @@
49except:43except:
50 traceback.print_exc()44 traceback.print_exc()
51 sys.exit(2)45 sys.exit(2)
52
5346
=== modified file 'scripts/ubuntu-community/ubuntu-member.py'
--- scripts/ubuntu-community/ubuntu-member.py 2012-02-21 03:39:06 +0000
+++ scripts/ubuntu-community/ubuntu-member.py 2012-03-05 03:55:20 +0000
@@ -1,35 +1,30 @@
1#!/usr/bin/python1#!/usr/bin/python
2
3import traceback, sys2import traceback, sys
4import libaccomplishments3
4from accomplishments.daemon import dbusapi
5
56
6try:7try:
7 import json, sys, os, pwd, subprocess8 import json, sys, os, pwd, subprocess
8 from ubuntuone.couch import auth9 from ubuntuone.couch import auth
9 from launchpadlib.launchpad import Launchpad10 from launchpadlib.launchpad import Launchpad
1011
11 libaccom = libaccomplishments.Accomplishments()12 api = dbusapi.Accomplishments()
1213 f = api.getExtraInformation("ubuntu-community", "launchpad-email")
13 f = libaccom.getExtraInformation("ubuntu-community", "launchpad-email")
14
15 if bool(f[0]["launchpad-email"]) == False:14 if bool(f[0]["launchpad-email"]) == False:
16 sys.exit(4)15 sys.exit(4)
17 else:16 else:
18 email = f[0]["launchpad-email"]17 email = f[0]["launchpad-email"]
1918 lp = Launchpad.login_anonymously(
20 lp=Launchpad.login_anonymously('ubuntu-community accomplishments','production')19 'ubuntu-community accomplishments', 'production')
21 me=lp.people.getByEmail(email=email)20 me = lp.people.getByEmail(email=email)
22
23 if me == None:21 if me == None:
24 sys.exit(1)22 sys.exit(1)
25 else:23 else:
26 user = me.name24 user = me.name
27
28 teams = [team.name for team in lp.people['ubuntumembers'].sub_teams]25 teams = [team.name for team in lp.people['ubuntumembers'].sub_teams]
29
30 if teams == []:26 if teams == []:
31 teams.append(lp.people['ubuntumembers'].name)27 teams.append(lp.people['ubuntumembers'].name)
32
33 try:28 try:
34 memberships = [29 memberships = [
35 membership for membership in30 membership for membership in
@@ -38,7 +33,6 @@
38 ['ubuntumembers'] + teams]33 ['ubuntumembers'] + teams]
39 except KeyError:34 except KeyError:
40 memberships = []35 memberships = []
41
42 if memberships:36 if memberships:
43 sys.exit(0)37 sys.exit(0)
44 else:38 else:
@@ -49,4 +43,3 @@
49except:43except:
50 traceback.print_exc()44 traceback.print_exc()
51 sys.exit(2)45 sys.exit(2)
52

Subscribers

People subscribed via source and target branches

to all changes: