def base64_decodestring(instr):
 if six.PY3:
  b = salt.utils.to_bytes(instr)
  data = base64.decodebytes(b)
  try:
   return salt.utils.to_str(data)
  except UnicodeDecodeError:
   return data
 return base64.decodestring(instr)

def base64_decodestring ( instr ) : if six . PY3 : b = salt . utils . to_bytes ( instr ) data = base64 . decodebytes ( b ) try : return salt . utils . to_str ( data ) except UnicodeDecodeError : return data return base64 . decodestring ( instr )
decode a base64-encoded string using the "legacy" python interface .