Make verbose work without needing to select a project

pull/510/head
Dakota Benjamin 2017-03-23 14:55:22 -04:00
rodzic d4d09cbc3f
commit 166405f7cc
2 zmienionych plików z 8 dodań i 9 usunięć

Wyświetl plik

@ -1,5 +1,6 @@
import argparse
from opendm import context
from opendm import io
import yaml
# parse arguments
@ -12,6 +13,8 @@ with open(context.settings_path) as stream:
datamap = yaml.safe_load(stream)
defaultSettings = datamap['settings']
with open(io.join_paths(context.root_path, 'VERSION')) as version_file:
__version__ = version_file.read().strip()
def alphanumeric_string(string):
import re
@ -355,10 +358,9 @@ def config():
help='Generates a benchmark file with runtime info\n'
'Default: %(default)s')
#TODO: Add gdal options
parser.add_argument('--version',
action='store_true',
default=False,
action='version',
version='OpenDroneMap {0}'.format(__version__),
help='Displays version number and exits. ')
return parser.parse_args()

9
run.py
Wyświetl plik

@ -12,9 +12,6 @@ import os
from scripts.odm_app import ODMApp
with open(io.join_paths(context.root_path, 'VERSION')) as version_file:
__version__ = version_file.read().strip()
def usage():
log.ODM_ERROR('You must specify a project name:')
@ -27,9 +24,9 @@ if __name__ == '__main__':
args = config.config()
if args.version:
log.ODM_INFO(__version__)
sys.exit(0)
#if args.version:
# log.ODM_INFO(__version__)
# sys.exit(0)
log.ODM_INFO('Initializing OpenDroneMap app - %s' % system.now())