Start rewriting options and config as common.py globals

This commit is contained in:
Daniel Martí 2013-11-01 12:10:57 +01:00
parent 1d88ba5450
commit c3be06fb1d
12 changed files with 129 additions and 99 deletions

View file

@ -1,8 +1,8 @@
#!/usr/bin/env python2
# -*- coding: utf-8 -*-
#
# publish.py - part of the FDroid server tools
# Copyright (C) 2010-13, Ciaran Gultnieks, ciaran@ciarang.com
# verify.py - part of the FDroid server tools
# Copyright (C) 2013, Ciaran Gultnieks, ciaran@ciarang.com
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
@ -24,12 +24,17 @@ import subprocess
import glob
from optparse import OptionParser
import common
from common import BuildException
options = None
config = None
def main():
#Read configuration...
execfile('config.py', globals())
global options, config
options, args = parse_commandline()
# Parse command line...
parser = OptionParser()
@ -39,6 +44,8 @@ def main():
help="Verify only the specified package")
(options, args) = parser.parse_args()
config = common.read_config(options)
tmp_dir = 'tmp'
if not os.path.isdir(tmp_dir):
print "Creating temporary directory"