Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

nicer dump of json in cache file, unindent section which searches for…

… repos defined in teams
  • Loading branch information...
commit b8cb123b58774967b32b7e2abe2d0b1a283d633a 1 parent fd7f9ee
Rok Garbas authored July 03, 2011

Showing 1 changed file with 9 additions and 8 deletions. Show diff stats Hide diff stats

  1. 17  githubcollective/config.py
17  githubcollective/config.py
@@ -66,7 +66,7 @@ def dumps(self, filename=None):
66 66
         json.dump({
67 67
             'teams': [self._teams[name].dumps() for name in self.teams],
68 68
             'repos': [self._repos[name].dumps() for name in self.repos],
69  
-            }, f)
  69
+            }, f, indent=4)
70 70
         f.close()
71 71
 
72 72
     def is_url(self, url):
@@ -139,13 +139,14 @@ def parse(self, data):
139 139
                 self._teams[name] = Team(name, permission,
140 140
                         members=members, repos=repos)
141 141
 
142  
-            # add repos to teams (defined with repo: section
143  
-            for section in config.sections():
144  
-                if section.startswith('repo:'):
145  
-                    repos = [section[len('repo:'):]]
146  
-                    if config.has_option(section, 'team'):
147  
-                        for team in config.get(section, 'team').split():
148  
-                            self._teams[TEAM_PREFIX + team].repos.update(repos)
  142
+        # add repos to teams (defined with repo: section
  143
+        for section in config.sections():
  144
+            if section.startswith('repo:'):
  145
+                if config.has_option(section, 'teams'):
  146
+                    for team in config.get(section, 'teams').split():
  147
+                        self._teams[TEAM_PREFIX + team].repos.add(
  148
+                                section[len('repo:'):],
  149
+                                )
149 150
 
150 151
 class ConfigGithub(Config):
151 152
 

0 notes on commit b8cb123

Please sign in to comment.
Something went wrong with that request. Please try again.