Ejemplo n.º 1
0
                    log.debug("Name '%s' already imported: %s" % (fqn, existing_name))
                
                    confirmed_fd.write( "%s\n" % fqn )
                    confirmed_fd.flush()
                    confirmed_names.append( fqn )
                    already_exists = True
                    break
                    
           except Exception, e:
                log.exception(e)
                sys.exit(0)
           
           log.debug( "name_import " + fqn + " " + btc_address + " " + update_hash + " (key " + pub_str + ")" )
           
           try:
               result = client.name_import( fqn, btc_address, update_hash, pk_str )
           except Exception, e:
               log.error( "register '%s' failed:\n%s\n" % (fqn, traceback.format_exc()) )
      
               if count == 0:      
                  failed_fd.write( "%s\n" % (fqn))
                  failed_fd.flush()

               count += 1
               continue 
        
           if type(result) == type([]):
               result = result[0]
        
           if 'error' in result.keys():
               log.error( "register '%s' failed:\n%s\n" % (fqn, pp.pformat(result)) )
Ejemplo n.º 2
0
                    log.debug("Name '%s' already imported: %s" % (fqn, existing_name))
                
                    confirmed_fd.write( "%s\n" % fqn )
                    confirmed_fd.flush()
                    confirmed_names.append( fqn )
                    already_exists = True
                    break
                    
           except Exception, e:
                log.exception(e)
                sys.exit(0)
           
           log.debug( "name_import " + fqn + " " + btc_address + " " + update_hash + " (key " + pub_str + ")" )
           
           try:
               result = client.name_import( fqn, btc_address, update_hash, pk_str )
           except Exception, e:
               log.error( "register '%s' failed:\n%s\n" % (fqn, traceback.format_exc()) )
      
               if count == 0:      
                  failed_fd.write( "%s\n" % (fqn))
                  failed_fd.flush()

               count += 1
               continue 
        
           if type(result) == type([]):
               result = result[0]
        
           if 'error' in result.keys():
               log.error( "register '%s' failed:\n%s\n" % (fqn, pp.pformat(result)) )