Stats-related things must be explicitly enabled (issue #51)

This commit is contained in:
Ciaran Gultnieks 2012-08-31 18:17:38 +01:00
parent 609611d79a
commit 27a07d7063
3 changed files with 32 additions and 17 deletions

View file

@ -49,3 +49,8 @@ wiki_path = "/wiki/"
wiki_user = "login"
wiki_password = "1234"
#Only set this to true when running a repository where you want to generate
#stats, and only then on the master build servers, not a development
#machine.
update_stats = False

View file

@ -33,8 +33,14 @@ import common
def main():
# Read configuration...
global update_stats
update_stats = False
execfile('config.py', globals())
if not update_stats:
print "Stats are disabled - check your configuration"
sys.exit(1)
# Parse command line...
parser = OptionParser()
parser.add_option("-v", "--verbose", action="store_true", default=False,

View file

@ -170,6 +170,8 @@ def update_wiki(apps, apks, verbose=False):
def main():
# Read configuration...
global update_stats
update_stats = False
execfile('config.py', globals())
# Parse command line...
@ -650,6 +652,8 @@ def main():
f.write(catdata)
f.close()
if update_stats:
# Update known apks info...
knownapks.writeifchanged()