mirror of
https://github.com/grahampugh/macadmin-scripts.git
synced 2025-12-18 18:26:31 +00:00
fix upstream error
This commit is contained in:
parent
73e447c451
commit
42b1840843
@ -119,7 +119,7 @@ def get_bridge_id():
|
|||||||
remotectl_cmd, stderr=subprocess.STDOUT
|
remotectl_cmd, stderr=subprocess.STDOUT
|
||||||
)
|
)
|
||||||
bridge_id = remotectl_output.decode("utf8").split(" ")[-1].split("\n")[0]
|
bridge_id = remotectl_output.decode("utf8").split(" ")[-1].split("\n")[0]
|
||||||
except subprocess.CalledProcessError as err:
|
except subprocess.CalledProcessError:
|
||||||
return None
|
return None
|
||||||
return bridge_id
|
return bridge_id
|
||||||
|
|
||||||
@ -804,13 +804,15 @@ def main():
|
|||||||
|
|
||||||
current_dir = os.getcwd()
|
current_dir = os.getcwd()
|
||||||
if os.path.expanduser("~") in current_dir:
|
if os.path.expanduser("~") in current_dir:
|
||||||
bad_dirs = ['Documents', 'Desktop', 'Downloads', 'Library']
|
bad_dirs = ["Documents", "Desktop", "Downloads", "Library"]
|
||||||
for bad_dir in bad_dirs:
|
for bad_dir in bad_dirs:
|
||||||
if bad_dir in os.path.split(this_dir):
|
if bad_dir in os.path.split(current_dir):
|
||||||
print('Running this script from %s may not work as expected. '
|
print(
|
||||||
'If this does not run as expected, please run again from '
|
"Running this script from %s may not work as expected. "
|
||||||
'somewhere else, such as /Users/Shared.'
|
"If this does not run as expected, please run again from "
|
||||||
% current_dir, file=sys.stderr)
|
"somewhere else, such as /Users/Shared." % current_dir,
|
||||||
|
file=sys.stderr,
|
||||||
|
)
|
||||||
|
|
||||||
if args.catalogurl:
|
if args.catalogurl:
|
||||||
su_catalog_url = args.catalogurl
|
su_catalog_url = args.catalogurl
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user