old_contents: # -*- coding: utf-8 -*-
  
  import requests
  import uuid
  import json
  
  
  def send(configberry):
      if not configberry.config.has_option('SERVIDOR', "uuid"):
          print uuid.getnode()
          uuidvalue = str(uuid.uuid1(uuid.getnode(), 0))[24:]
          configberry.writeSectionWithKwargs('SERVIDOR', {'uuid': uuidvalue})
  
      senddata = {
          "uuid": configberry.config.get('SERVIDOR', 'uuid'),
          "ip_privada": configberry.config.get('SERVIDOR', 'ip_privada'),
          "raw_data": json.dumps(configberry.getJSON())
      }
  
      print senddata
  
      discoverUrl = configberry.config.get('SERVIDOR', "discover_url")
  
      resp = requests.post(discoverUrl, data=senddata)
  
      print resp
      # resp.raise_for_status()
  
      return resp
  
new_contents: # -*- coding: utf-8 -*-
  
  import requests
  import uuid
  import json
  
  
  def send(configberry):
      if not configberry.config.has_option('SERVIDOR', "uuid"):
          print uuid.getnode()
          uuidvalue = str(uuid.uuid1(uuid.getnode(), 0))[24:]
          configberry.writeSectionWithKwargs('SERVIDOR', {'uuid': uuidvalue})
  
      senddata = {
          "uuid": configberry.config.get('SERVIDOR', 'uuid'),
          "ip_privada": configberry.config.get('SERVIDOR', 'ip_privada'),
          "raw_data": json.dumps(configberry.getJSON())
      }
  
      print senddata
  
      discoverUrl = configberry.config.get('SERVIDOR', "discover_url")
  
      try:
          print requests.post(discoverUrl, data=senddata)
      except Exception, e:
          print("Mensaje de exception del discover: ", e)
  
      # resp.raise_for_status()
  
  
subject: Fix alevilar/paxapos-plugin#476