def set_opt_out(flag):
 if (flag and (not is_opt_out())):
  PersistentCacheEntry.objects.create(data=True, **OPT_OUT_KWARGS)
  return True
 else:
  PersistentCacheEntry.objects.filter(**OPT_OUT_KWARGS).delete()
  return False

def set_opt_out ( flag ) : if ( flag and ( not is_opt_out ( ) ) ) : PersistentCacheEntry . objects . create ( data = True , ** OPT_OUT_KWARGS ) return True else : PersistentCacheEntry . objects . filter ( ** OPT_OUT_KWARGS ) . delete ( ) return False
set whether this installation is opted-out from telemetry submissions .