fix to keyError
This commit is contained in:
parent
6fe0bc5000
commit
ef138afac9
8
main.py
8
main.py
@ -55,7 +55,11 @@ def get_everything(manifest_path, early_cutoff):
|
||||
try:
|
||||
config = yaml.safe_load(stream)
|
||||
#below lines will probably need to be refactored as tasks expand
|
||||
vcs_path = config['Upstream_VCS']
|
||||
try:
|
||||
vcs_path = config['Upstream_VCS']
|
||||
except:
|
||||
print('error with the keys, i guess')
|
||||
return
|
||||
print("------------------")
|
||||
#print(vcs_path) return
|
||||
try:
|
||||
@ -74,7 +78,7 @@ def get_everything(manifest_path, early_cutoff):
|
||||
largest_object[repo_path]['ghs_obj'] = ghs.main(vcs_path, early_cutoff)
|
||||
#print(ghs_obj["time_cleaned_comm"])
|
||||
repo_uri_list = repo_path.split('/')
|
||||
with open('/data/users/mgaughan/kkex_data_110823_2/' + repo_uri_list[-2] + '_' + repo_uri_list[-1] + '_result.json', 'w') as data_path:
|
||||
with open('/data/users/mgaughan/kkex_data_110823_3/' + repo_uri_list[-2] + '_' + repo_uri_list[-1] + '_result.json', 'w') as data_path:
|
||||
json.dump(largest_object[repo_path], data_path)
|
||||
|
||||
except yaml.YAMLError as err:
|
||||
|
Loading…
Reference in New Issue
Block a user