Removed ConfigOptionParser usaged
Command line args are now parsed with the vanilla OptParser. This paves the way for a new settings.py parser
This commit is contained in:
@@ -26,5 +26,6 @@ render = {
|
||||
"bg-color": dict(required=False, validator=validateBGColor),
|
||||
"optimize-img": dict(required=False, validator=validateOptImg),
|
||||
"no-markers": dict(required=False, validator=bool),
|
||||
"texture-path": dict(required=False, validator=validateTexturePath),
|
||||
}
|
||||
|
||||
|
||||
@@ -58,5 +58,10 @@ def validateBGColor(color):
|
||||
def validateOptImg(opt):
|
||||
return bool(opt)
|
||||
|
||||
|
||||
def valiateTexturePath(path):
|
||||
# Expand user dir in directories strings
|
||||
path = os.path.expanduser(path)
|
||||
# TODO assert this path exists?
|
||||
if options.web_assets_path:
|
||||
options.web_assets_path = os.path.expanduser(options.web_assets_path)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user