don't raise an error if the script isn't in the resource

This commit is contained in:
Damien Churchill 2010-04-23 23:43:20 +01:00
parent 8b7c1681ae
commit ade5f596f4
1 changed files with 3 additions and 2 deletions

View File

@ -363,8 +363,9 @@ class ScriptResource(resource.Resource, component.Component):
if type not in ("dev", "debug", "normal"): if type not in ("dev", "debug", "normal"):
type = "normal" type = "normal"
del self.__scripts[type]["scripts"][path] if path in self.__scripts[type]["scripts"]:
self.__scripts[type]["order"].remove(path) del self.__scripts[type]["scripts"][path]
self.__scripts[type]["order"].remove(path)
def get_scripts(self, type=None): def get_scripts(self, type=None):