code: def get_osarch():
      '''
      Get the os architecture using rpm --eval
      '''
      if salt.utils.path.which('rpm'):
          ret = subprocess.Popen(
              'rpm --eval "%{_host_cpu}"',
              shell=True,
              close_fds=True,
              stdout=subprocess.PIPE,
              stderr=subprocess.PIPE).communicate()[0]
      else:
          ret = ''.join([x for x in platform.uname()[-2:] if x][-1:])
  
      return salt.utils.stringutils.to_str(ret).strip() or 'unknownf get_osarch():
      '''
      Get the os architecture using rpm --eval
      '''
      if salt.utils.path.which('rpm'):
          ret = subprocess.Popen(
              'rpm --eval "%{_host_cpu}"',
              shell=True,
              close_fds=True,
              stdout=subprocess.PIPE,
              stderr=subprocess.PIPE).communicate()[0]
      else:
          ret = ''.join([x for x in platform.uname()[-2:] if x][-1:])
  
      return salt.utils.stringutils.to_str(ret).strip() or 'unknown'
docs: Get the os architecture using rpm --eval