def _handle_shutdown_reply(self, msg):
self.log.debug("<STR_LIT>", msg.get('<STR_LIT:content>', '<STR_LIT>'))<EOL>if not self._hidden and not self._is_from_this_session(msg):<EOL><INDENT>if self._local_kernel:<EOL><INDENT>if not msg['<STR_LIT:content>']['<STR_LIT>']:<EOL><INDENT>self.exit_requested.emit(self)<EOL><DEDENT>else:<EOL><INDENT>time.sleep(<NUM_LIT>) <EOL>self.reset()<EOL><DEDENT><DEDENT>else: <EOL><INDENT>title = self.window().windowTitle()<EOL>if not msg['<STR_LIT:content>']['<STR_LIT>']:<EOL><INDENT>reply = QtGui.QMessageBox.question(self, title,<EOL>"<STR_LIT>"<EOL>"<STR_LIT>",<EOL>QtGui.QMessageBox.Yes,QtGui.QMessageBox.No)<EOL>if reply == QtGui.QMessageBox.Yes:<EOL><INDENT>self.exit_requested.emit(self)<EOL><DEDENT><DEDENT>else:<EOL><INDENT>reply = QtGui.QMessageBox.question(self, title,<EOL>"<STR_LIT>",<EOL>QtGui.QMessageBox.Yes,QtGui.QMessageBox.No)<EOL>if reply == QtGui.QMessageBox.Yes:<EOL><INDENT>time.sleep(<NUM_LIT>) <EOL>self.reset()<EOL><DEDENT><DEDENT><DEDENT><DEDENT>
Handle shutdown signal, only if from other console.