Explorar el Código

Bug fix for clicking on an object that has left the system.

Joe Hager hace 18 años
padre
commit
d480af74a0
Se han modificado 1 ficheros con 5 adiciones y 1 borrados
  1. 5 1
      direct/src/http/webAIInspector.py

+ 5 - 1
direct/src/http/webAIInspector.py

@@ -64,7 +64,11 @@ class aiWebServer(SystemInformation):
         for j, k in kw.iteritems():
             doIdRequested = int(k)
             #print j,k
-        memberList = inspect.getmembers(simbase.air.doId2do[doIdRequested])
+        try:
+            memberList = inspect.getmembers(simbase.air.doId2do[doIdRequested])
+        except KeyError:
+            replyTo.respond('<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">\n<html>\n<head>\n<meta content="text/html; charset=ISO-8859-1" http-equiv="content-type">\n<TITLE>OBJ Gone</title>\n</head><body>The object is no longer on the system</body>\n</HTML>')
+            return
         memberList.sort()
         memberList.reverse()
         while memberList: