Skip to content

Commit 3a314b1

Browse files
committed
Changed subprocess call from .check_output to .Popen to fix an error when finding the operating directory when running initial_setup.py. .check_output seemed to be having trouble when any exit status other than 0.
1 parent f8275ff commit 3a314b1

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

initial_setup.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@
66

77

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

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

0 commit comments

Comments
 (0)