Changeset - 9fec2207f91c
[Not reviewed]
beta
0 1 0
Marcin Kuzminski - 15 years ago 2010-11-29 01:34:19
marcin@python-works.com
removed binary files from trending sources
1 file changed with 1 insertions and 1 deletions:
0 comments (0 inline, 0 general)
rhodecode/lib/celerylib/tasks.py
Show inline comments
 
@@ -341,25 +341,25 @@ def __get_codes_stats(repo_name):
 

	
 
    repos_path = get_repos_path()
 
    p = os.path.join(repos_path, repo_name)
 
    repo = get_repo(p)
 
    tip = repo.get_changeset()
 
    code_stats = {}
 

	
 
    def aggregate(cs):
 
        for f in cs[2]:
 
            ext = f.extension
 
            key = LANGUAGES_EXTENSIONS_MAP.get(ext, ext)
 
            key = key or ext
 
            if ext in LANGUAGES_EXTENSIONS_MAP.keys():
 
            if ext in LANGUAGES_EXTENSIONS_MAP.keys() and not f.is_binary:
 
                if code_stats.has_key(key):
 
                    code_stats[key] += 1
 
                else:
 
                    code_stats[key] = 1
 

	
 
    map(aggregate, tip.walk('/'))
 

	
 
    return code_stats or {}
 

	
 

	
 

	
 

	
0 comments (0 inline, 0 general)