def getPassphrase(self, reason=None): from CreateNewKeyDialog import CreateNewKeyDialog createNewKeyDialog = CreateNewKeyDialog( self.parentWindow, self.progressDialog, wx.ID_ANY, self.parentWindow.programName, self.keyModel.getPrivateKeyFilePath(), self.displayStrings, displayMessageBoxReportingSuccess=False) try: wx.EndBusyCursor() stoppedBusyCursor = True except: stoppedBusyCursor = False canceled = createNewKeyDialog.ShowModal() == wx.ID_CANCEL if stoppedBusyCursor: wx.BeginBusyCursor() if (not canceled): logger.debug("User didn't cancel from CreateNewKeyDialog.") self.password = createNewKeyDialog.getPassphrase() event = KeyDist.sshKeyDistEvent( KeyDist.EVT_KEYDIST_NEWPASS_COMPLETE, self) wx.PostEvent(self.notifywindow.GetEventHandler(), event) else: logger.debug( "KeyDist.getPassphrase: User canceled from CreateNewKeyDialog." ) self.cancel()
def getPassphrase(self,queue): createNewKeyDialog = CreateNewKeyDialog(self.parentWindow, self.progressDialog, wx.ID_ANY, self.parentWindow.programName, self.keyModel.getPrivateKeyFilePath(),self.displayStrings, displayMessageBoxReportingSuccess=False) try: wx.EndBusyCursor() stoppedBusyCursor = True except: stoppedBusyCursor = False canceled = createNewKeyDialog.ShowModal()==wx.ID_CANCEL if stoppedBusyCursor: wx.BeginBusyCursor() if (not canceled): logger.debug("User didn't cancel from CreateNewKeyDialog.") passphrase=createNewKeyDialog.getPassphrase() queue.put((canceled,passphrase)) else: queue.put((canceled,None))
def getPassphrase(self,reason=None): from CreateNewKeyDialog import CreateNewKeyDialog createNewKeyDialog = CreateNewKeyDialog(self.parentWindow, self.progressDialog, wx.ID_ANY, 'MASSIVE/CVL Launcher Private Key', self.keyModel.getPrivateKeyFilePath(),self.displayStrings, displayMessageBoxReportingSuccess=False) try: wx.EndBusyCursor() stoppedBusyCursor = True except: stoppedBusyCursor = False canceled = createNewKeyDialog.ShowModal()==wx.ID_CANCEL if stoppedBusyCursor: wx.BeginBusyCursor() if (not canceled): logger.debug("User didn't cancel from CreateNewKeyDialog.") self.password=createNewKeyDialog.getPassphrase() event = KeyDist.sshKeyDistEvent(KeyDist.EVT_KEYDIST_NEWPASS_COMPLETE,self) wx.PostEvent(self.notifywindow.GetEventHandler(),event) else: logger.debug("KeyDist.getPassphrase: User canceled from CreateNewKeyDialog.") self.cancel()
def getPassphrase(self, queue): createNewKeyDialog = CreateNewKeyDialog( self.parentWindow, self.progressDialog, wx.ID_ANY, self.parentWindow.programName, self.keyModel.getPrivateKeyFilePath(), self.displayStrings, displayMessageBoxReportingSuccess=False) try: wx.EndBusyCursor() stoppedBusyCursor = True except: stoppedBusyCursor = False canceled = createNewKeyDialog.ShowModal() == wx.ID_CANCEL if stoppedBusyCursor: wx.BeginBusyCursor() if (not canceled): logger.debug("User didn't cancel from CreateNewKeyDialog.") passphrase = createNewKeyDialog.getPassphrase() queue.put((canceled, passphrase)) else: queue.put((canceled, None))