parameters: ()
return_statement: return {'major': version[0], 'minor': version[1]}
docstring: Check if the current image of IoT Box is up to date
docstring_summary: Check if the current image of IoT Box is up to date
docstring_tokens: Check if the current image of IoT Box is up to date
function: def check_image():
      """
      Check if the current image of IoT Box is up to date
      """
      url = 'https://nightly.odoo.com/master/iotbox/SHA1SUMS.txt'
      urllib3.disable_warnings()
      http = urllib3.PoolManager(cert_reqs='CERT_NONE')
      response = http.request('GET', url)
      checkFile = {}
      valueActual = ''
      for line in response.data.decode().split('\n'):
          if line:
              value, name = line.split('  ')
              checkFile.update({value: name})
              if name == 'iotbox-latest.zip':
                  valueLastest = value
              elif name == get_img_name():
                  valueActual = value
      if valueActual == valueLastest:
          return False
      version = checkFile.get(valueLastest, 'Error').replace('iotboxv', '').replace('.zip', '').split('_')
      return {'major': version[0], 'minor': version[1]}
function_tokens: def check_image ( ) : url = 'https://nightly.odoo.com/master/iotbox/SHA1SUMS.txt' urllib3 . disable_warnings ( ) http = urllib3 . PoolManager ( cert_reqs = 'CERT_NONE' ) response = http . request ( 'GET' , url ) checkFile = { } valueActual = '' for line in response . data . decode ( ) . split ( '\n' ) : if line : value , name = line . split ( '  ' ) checkFile . update ( { value : name } ) if name == 'iotbox-latest.zip' : valueLastest = value elif name == get_img_name ( ) : valueActual = value if valueActual == valueLastest : return False version = checkFile . get ( valueLastest , 'Error' ) . replace ( 'iotboxv' , '' ) . replace ( '.zip' , '' ) . split ( '_' ) return { 'major' : version [ 0 ] , 'minor' : version [ 1 ] }