diff --git a/overviewer.py b/overviewer.py index 8a774f9..2a93845 100755 --- a/overviewer.py +++ b/overviewer.py @@ -304,6 +304,21 @@ dir but you forgot to put quotes around the directory, since it contains spaces. if render.get('forcerender', False): render['renderchecks'] = 2 + # check if overlays are set, if so, make sure that those renders exist + if render.get('overlay', []) != []: + for x in render.get('overlay'): + if x != rname: + try: + renderLink = config['renders'][x] + except KeyError: + logging.error("Render %s's overlay is '%s', but I could not find a corresponding entry in the renders dictionary.", + rname, x) + return 1 + # TODO: Link the overlay rendering to the render modes it is used for so that the JS can properly fill in the dropdown + else: + logging.error("Render %s's overlay contains itself.", rname) + return 1 + destdir = config['outputdir'] if not destdir: logging.error("You must specify the output directory in your config file.") diff --git a/overviewer_core/settingsValidators.py b/overviewer_core/settingsValidators.py index 7b023a8..227f4d3 100644 --- a/overviewer_core/settingsValidators.py +++ b/overviewer_core/settingsValidators.py @@ -55,7 +55,8 @@ def validateOverlays(renderlist): if type(renderlist) != list: raise ValidationException("Overlay must specify a list of renders") for x in renderlist: - print x + if validateStr(x) == '': + raise ValidationException("%r must be a string"% x) return renderlist def validateWorldPath(worldpath):