Skip to content

Commit

Permalink
COPPA: Set the parental setting in the background
Browse files Browse the repository at this point in the history
During the post-update scenarios the parental setting is set to be COPPA
compliant. When we do this, the `kano-settings-cli` command it used but
this blocks while the sentry proxy server is restarted and then owns the
server itself and thus never returns, causing a hang. To resolve this,
trigger the parental setting configuration in the background and wait
for the process to establish itself.
  • Loading branch information
tombettany committed Sep 3, 2019
1 parent 180672f commit e9d6f4f
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion kano_updater/scenarios.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

import os
import shutil
import time
import traceback

from kano.logging import logger
Expand Down Expand Up @@ -1269,4 +1270,11 @@ def beta_4_3_1_to_beta_4_3_2(self, dummy_progress):
run_cmd_log('rm -f /usr/share/icons/Kano/66x66/apps/pidgin.png')

# Set Parental Controls to Ultimate for all existing users. COPPA.
run_for_every_user('sudo kano-settings-cli set parental --level=3 "kano"')
# FIXME: The parental command sets the parental level and then
# restarts the sentry server, blocking on the process. We kick
# it off in the background here and wait a bit for things to
# happen but the settings command shouldn't block
run_for_every_user(
'sudo kano-settings-cli set parental --level=3 "kano" &'
)
time.sleep(10)

0 comments on commit e9d6f4f

Please sign in to comment.