0

more indentation fixes

This commit is contained in:
Aaron Griffith
2011-08-15 15:29:36 -04:00
parent 0c523461fa
commit e618e949c9
2 changed files with 11 additions and 10 deletions

View File

@@ -118,7 +118,6 @@ def main():
parser.add_option("--skip-js", dest="skipjs", action="store_true", helptext="Don't output marker.js or regions.js")
parser.add_option("--no-signs", dest="nosigns", action="store_true", helptext="Don't output signs to markers.js")
parser.add_option("--display-config", dest="display_config", action="store_true", helptext="Display the configuration parameters, but don't render the map. Requires all required options to be specified", commandLineOnly=True)
parser.add_option("--advanced-help", dest="advanced_help", action="store_true", helptext="Display help - including advanced options", commandLineOnly=True)
#parser.add_option("--write-config", dest="write_config", action="store_true", helptext="Writes out a sample config file", commandLineOnly=True)
options, args = parser.parse_args()

View File

@@ -23,7 +23,8 @@ class ConfigOptionParser(object):
self.requiredArgs = []
# add the *very* special config-file path option
# add the *very* special advanced help and config-file path options
self.add_option("--advanced-help", dest="advanced_help", action="store_true", helptext="Display help - including advanced options", commandLineOnly=True)
self.add_option("--settings", dest="config_file", helptext="Specifies a settings file to load, by name. This file's format is discussed in the README.", metavar="PATH", type="string", commandLineOnly=True)
def display_config(self):
@@ -58,7 +59,8 @@ class ConfigOptionParser(object):
for opt in self.advancedHelp:
opt[1]['help']="[!]" + opt[1]['helptext']
for arg in self.customArgs:
if arg in opt[1].keys(): del opt[1][arg]
if arg in opt[1].keys():
del opt[1][arg]
if opt[1].get("type", None):
opt[1]['type'] = 'string' # we'll do our own converting later
self.cmdParser.add_option(*opt[0], **opt[1])