Check if force-focal/force-ccd arguments are given

pull/161/head
Pau Gargallo 2015-08-27 18:35:46 +02:00
rodzic a7e283c25e
commit f7c1029fb7
1 zmienionych plików z 2 dodań i 2 usunięć

4
run.py
Wyświetl plik

@ -340,14 +340,14 @@ def prepare_objects():
fileObject["width"] = int(match.group(1).strip())
fileObject["height"] = int(match.group(2).strip())
if '--force-focal' not in args:
if args.force_focal is None:
match = re.search(":[\ ]*([0-9\.]*)mm", file_focal)
if match:
fileObject["focal"] = float((match.group()[1:-2]).strip())
else:
fileObject["focal"] = args.force_focal
if '--force-ccd' not in args:
if args.force_ccd is None:
match = re.search(":[\ ]*([0-9\.]*)mm", file_ccd)
if match:
fileObject["ccd"] = float(match.group()[1:-2].strip())