Exemplo n.º 1
0
 def get_passphrase(self, msg, confirm):
     import getpass
     print_stderr(msg)
     if self.passphrase_on_device and self.yes_no_question(
             _('Enter passphrase on device?')):
         return PASSPHRASE_ON_DEVICE
     else:
         return getpass.getpass('')
Exemplo n.º 2
0
 def callback(response):
     err = response.get('error')
     if err:
         try:
             print_stderr("Transaction broadcast error", err['code'],
                          err['message'])
         except:
             print_stderr("Transaction broadcast error:", err)
     else:
         print_error("Transaction broadcast result:",
                     response)  # --verbose only
Exemplo n.º 3
0
 def _on_callback(self, *args):
     util.print_stderr("[Callback] " + ", ".join(repr(x) for x in args))