Forgot that isfile wasn't imported the way I normally do it.
This commit is contained in:
parent
89a1a89a06
commit
3c10bbfe27
|
|
@ -424,8 +424,8 @@ def get_application_instructions(target):
|
|||
except urllib.error.HTTPError:
|
||||
print('[N] No instructions found for: {}'.format(target))
|
||||
print('[N] Trying local instructions under ./deployments/applications')
|
||||
local_path = './deployments/applications' if isfile('./archinstall.py') else './archinstall/deployments/applications' # Dangerous assumption
|
||||
if isfile(f'{local_path}/deployments/applications/{target}.json'):
|
||||
local_path = './deployments/applications' if os.path.isfile('./archinstall.py') else './archinstall/deployments/applications' # Dangerous assumption
|
||||
if os.path.isfile(f'{local_path}/deployments/applications/{target}.json'):
|
||||
with open(f'{local_path}/deployments/applications/{target}.json', 'r') as fh:
|
||||
instructions = fh.read()
|
||||
|
||||
|
|
@ -450,8 +450,8 @@ def get_instructions(target):
|
|||
except urllib.error.HTTPError:
|
||||
print('[N] No instructions found called: {}'.format(target))
|
||||
print('[N] Trying local instructions under ./deployments')
|
||||
local_path = './deployments' if isfile('./archinstall.py') else './archinstall/deployments' # Dangerous assumption
|
||||
if isfile(f'{local_path}/deployments/{target}.json'):
|
||||
local_path = './deployments' if os.path.isfile('./archinstall.py') else './archinstall/deployments' # Dangerous assumption
|
||||
if os.path.isfile(f'{local_path}/deployments/{target}.json'):
|
||||
with open(f'{local_path}/deployments/{target}.json', 'r') as fh:
|
||||
instructions = fh.read()
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue