Selaa lähdekoodia

only report 'not found' error if item is not found

Josh Wilson 19 vuotta sitten
vanhempi
sitoutus
383db87ca4
1 muutettua tiedostoa jossa 3 lisäystä ja 2 poistoa
  1. 3 2
      direct/src/showbase/Pool.py

+ 3 - 2
direct/src/showbase/Pool.py

@@ -40,9 +40,10 @@ class Pool:
         """
         if item in self.__free:
             self.__free.remove(item)
-        if item in self.__used:
+        elif item in self.__used:
             self.__used.remove(item)
-        self.notify.error("item not in pool")
+        else:
+            self.notify.error("item not in pool")
 
     def checkout(self):
         """