Initialize a drone from the database and validate
(self)
| 56 | |
| 57 | @reconstructor |
| 58 | def init(self): |
| 59 | """Initialize a drone from the database and validate""" |
| 60 | self._item = None |
| 61 | |
| 62 | if self.itemID: |
| 63 | self._item = eos.db.getItem(self.itemID) |
| 64 | if self._item is None: |
| 65 | pyfalog.error("Item (id: {0}) does not exist", self.itemID) |
| 66 | return |
| 67 | |
| 68 | try: |
| 69 | self._mutaReconstruct() |
| 70 | except MutaError: |
| 71 | return |
| 72 | |
| 73 | if self.isInvalid: |
| 74 | pyfalog.error("Item (id: {0}) is not a Drone", self.itemID) |
| 75 | return |
| 76 | |
| 77 | self.build() |
| 78 | |
| 79 | def build(self): |
| 80 | """ Build object. Assumes proper and valid item already set """ |
nothing calls this directly
no test coverage detected