Commits

Andrew Godwin  committed c8afb31

Fix odd bug

  • Participants
  • Parent commits 56b6960

Comments (0)

Files changed (1)

File myne/protocol.py

         reactor.callLater(0.001, self.sendLevelChunk)
     
     def sendLevelChunk(self):
+        if not hasattr(self, chunk):
+            self.log("Cannot send chunk, there isn't one! %r %r" % (self, self.__dict__), level=logging.ERROR)
+            return
         if self.chunk:
             self.sendPacked(TYPE_CHUNK, len(self.chunk), self.chunk, chr(int(100*(self.zipped_level.tell()/float(self.zipped_size)))))
             self.chunk = self.zipped_level.read(1024)