def get(self, path): try: uri = self.get_argument('uri') except: return self.shared_resource(path) try: modgui = get_plugin_gui_mini(uri) except: raise web.HTTPError(404) try: root = modgui['resourcesDirectory'] except: raise web.HTTPError(404) try: super(EffectResource, self).initialize(root) return super(EffectResource, self).get(path) except web.HTTPError as e: if e.status_code != 404: raise e return self.shared_resource(path) except IOError: raise web.HTTPError(404)
def get(self, path): try: uri = self.get_argument('uri') except: return self.shared_resource(path) try: modgui = get_plugin_gui_mini(uri) except: raise HTTPError(404) try: root = modgui['resourcesDirectory'] except: raise HTTPError(404) try: super(EffectResource, self).initialize(root) return super(EffectResource, self).get(path) except HTTPError as e: if e.status_code != 404: raise e return self.shared_resource(path) except IOError: raise HTTPError(404)
def initialize(self): uri = self.get_argument('uri') try: self.modgui = get_plugin_gui_mini(uri) except: raise web.HTTPError(404) try: root = self.modgui['resourcesDirectory'] except: raise web.HTTPError(404) return web.StaticFileHandler.initialize(self, root)