Skip to content

Commit

Permalink
Changed subprocess call from .check_output to .Popen to fix an error …
Browse files Browse the repository at this point in the history
…when finding the operating directory when running initial_setup.py. .check_output seemed to be having trouble when any exit status other than 0.
  • Loading branch information
jasbur committed Aug 31, 2017
1 parent f8275ff commit 3a314b1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion initial_setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@


def update_config_paths():
project_path = subprocess.check_output(['find', '/', '-name', 'GSbSFZwWV1mig4vFSmbLW9iP8TfGfMYCPfHTqGcD'])[:-42].decode('utf-8')
find_output = subprocess.Popen(['find', '/', '-name', 'GSbSFZwWV1mig4vFSmbLW9iP8TfGfMYCPfHTqGcD'], stdout=subprocess.PIPE)
project_path_raw, err = find_output.communicate()
project_path = str(project_path_raw.decode('utf-8'))[:-42]

os.system('sudo cp -a Reset\ Device/static_files/rc.local.aphost.template Reset\ Device/static_files/rc.local.aphost')
os.system('sudo cp -a Reset\ Device/static_files/rc.local.apclient.template Reset\ Device/static_files/rc.local.apclient')
Expand Down

0 comments on commit 3a314b1

Please sign in to comment.