fix to keyError
This commit is contained in:
parent
6fe0bc5000
commit
ef138afac9
10
main.py
10
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:
|
||||
@ -112,4 +116,4 @@ largest_object[repo_path]['old_mmt'] = compute_old_mmt(largest_object[repo_path]
|
||||
#new mmt formality score
|
||||
largest_object[repo_path]['new_formality'] = compute_formality_score(largest_object[repo_path]['new_mmt'], largest_object[repo_path]["gha_obj"]['milestone_count'], largest_object[repo_path]["perceval_obj"]['age_of_project'])
|
||||
print(largest_object[repo_path]['new_formality'])
|
||||
'''
|
||||
'''
|
||||
|
Loading…
Reference in New Issue
Block a user