53 |
53 |
54 with open ('cobalt.json', 'w') as fp: |
54 with open ('cobalt.json', 'w') as fp: |
55 json.dump (self.obj, fp, sort_keys = True, indent = 1) |
55 json.dump (self.obj, fp, sort_keys = True, indent = 1) |
56 |
56 |
57 print "Config saved." |
57 print "Config saved." |
|
58 |
|
59 def find_developer_by_email (self, commit_email): |
|
60 for developer, emails in self.get_value ('developer_emails', default={}).iteritems(): |
|
61 if commit_email in emails: |
|
62 return developer |
|
63 |
|
64 return '' |
58 |
65 |
59 def init(): |
66 def init(): |
60 print 'Loading configuration...' |
67 print 'Loading configuration...' |
61 |
68 |
62 try: |
69 try: |