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

@ -29,12 +29,12 @@ from optparse import OptionParser
import common
from common import BuildException
config = {}
config = None
options = None
def main():
# Read configuration...
common.read_config(config)
global config, options
# Parse command line...
parser = OptionParser()
@ -44,6 +44,8 @@ def main():
help="Publish only the specified package")
(options, args) = parser.parse_args()
config = common.read_config(options)
log_dir = 'logs'
if not os.path.isdir(log_dir):
print "Creating log directory"