Restore shebang and don't do store if completion

This commit is contained in:
Joshua Boniface 2021-06-23 05:26:50 -04:00
parent 04fa63f081
commit bbb132414c
1 changed files with 17 additions and 13 deletions

View File

@ -1,3 +1,5 @@
#!/usr/bin/env python3
# pvc.py - PVC client command-line interface # pvc.py - PVC client command-line interface
# Part of the Parallel Virtual Cluster (PVC) system # Part of the Parallel Virtual Cluster (PVC) system
# #
@ -42,6 +44,7 @@ import pvc.cli_lib.provisioner as pvc_provisioner
myhostname = socket.gethostname().split('.')[0] myhostname = socket.gethostname().split('.')[0]
zk_host = '' zk_host = ''
is_completion = True if os.environ.get('_PVC_COMPLETE', '') == 'complete' else False
default_store_data = { default_store_data = {
'cfgfile': '/etc/pvc/pvcapid.yaml' 'cfgfile': '/etc/pvc/pvcapid.yaml'
@ -131,6 +134,7 @@ def update_store(store_path, store_data):
fh.write(json.dumps(store_data, sort_keys=True, indent=4)) fh.write(json.dumps(store_data, sort_keys=True, indent=4))
if not is_completion:
pvc_client_dir = os.environ.get('PVC_CLIENT_DIR', None) pvc_client_dir = os.environ.get('PVC_CLIENT_DIR', None)
home_dir = os.environ.get('HOME', None) home_dir = os.environ.get('HOME', None)
if pvc_client_dir: if pvc_client_dir: