# Get the version of the product from the application definition
version = config.APPLICATION.products[product_name]
- # if no version, then take the default one defined in the application
- if isinstance(version, bool):
- version = config.APPLICATION.tag
# Define debug and dev modes
# Get the tag if a dictionary is given in APPLICATION.products for the
verbose = 'no'
base = 'maybe'
section = None
+
+ # if no version, then take the default one defined in the application
+ if isinstance(version, bool):
+ # in this case tag is mandatory, not debug, verbose, dev
+ version = config.APPLICATION.tag
+ if 'debug' in config.APPLICATION:
+ debug = config.APPLICATION.debug
+ if 'verbose' in config.APPLICATION:
+ verbose = config.APPLICATION.verbose
+ if 'dev' in config.APPLICATION:
+ dev = config.APPLICATION.dev
+
if isinstance(version, src.pyconf.Mapping):
dic_version = version
# Get the version/tag
# Get the debug if any
if 'debug' in dic_version:
debug = dic_version.debug
+ elif 'debug' in config.APPLICATION:
+ debug = config.APPLICATION.debug
# Get the verbose if any
if 'verbose' in dic_version:
verbose = dic_version.verbose
+ elif 'verbose' in config.APPLICATION:
+ verbose = config.APPLICATION.verbose
# Get the dev if any
if 'dev' in dic_version:
dev = dic_version.dev
+ elif 'dev' in config.APPLICATION:
+ dev = config.APPLICATION.dev
# Get the base if any
if 'base' in dic_version: