From: Daniel Martí Date: Thu, 30 Jan 2014 22:58:23 +0000 (+0100) Subject: Merge branch 'master' into logging X-Git-Tag: 0.2~340 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=430cd42f80b97affc876f6752dfed915cf316b76;p=fdroidserver.git Merge branch 'master' into logging Conflicts: fdroidserver/common.py --- 430cd42f80b97affc876f6752dfed915cf316b76 diff --cc fdroidserver/common.py index 9469f776,4a85bf3d..413937ce --- a/fdroidserver/common.py +++ b/fdroidserver/common.py @@@ -1210,16 -1239,20 +1210,20 @@@ def scan_source(build_dir, root_dir, th problems.append('Found %s at %s' % (what, fd)) def warnproblem(what, fd, fp): - print 'Warning: Found %s at %s' % (what, fd) + logging.info('Warning: Found %s at %s' % (what, fd)) + def insidedir(path, dirname): + return path.endswith('/%s' % dirname) or '/%s/' % dirname in path + - # Iterate through all files in the source code... + # Iterate through all files in the source code for r,d,f in os.walk(build_dir): - for curfile in f: - if '/.hg' in r or '/.git' in r or '/.svn' in r: - continue + if any(insidedir(r, igndir) for igndir in ('.hg', '.git', '.svn')): + continue + + for curfile in f: - # Path (relative) to the file... + # Path (relative) to the file fp = os.path.join(r, curfile) fd = fp[len(build_dir):]