fixing gsql error
This commit is contained in:
parent
e1ee90a6a7
commit
6fe0bc5000
@ -58,9 +58,13 @@ def get_discussion_gql(repo_owner, repo_name):
|
||||
data = {"query" : data_string}
|
||||
data_json = json.dumps(data)
|
||||
headers = {'content-type': 'application/json', 'Accept-Charset': 'UTF-8', 'Authorization': 'bearer ' + key}
|
||||
r = requests.post(url=url, data=data_json, headers=headers)
|
||||
print(r.content)
|
||||
return r.json()
|
||||
try:
|
||||
r = requests.post(url=url, data=data_json, headers=headers)
|
||||
print(r.content)
|
||||
return r.json()
|
||||
except:
|
||||
print("issue somewhere with getting gsql stuff")
|
||||
return {}
|
||||
|
||||
def within_time(comment_content, early_cutoff):
|
||||
try:
|
||||
|
2
main.py
2
main.py
@ -74,7 +74,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_1/' + repo_uri_list[-2] + '_' + repo_uri_list[-1] + '_result.json', 'w') as data_path:
|
||||
with open('/data/users/mgaughan/kkex_data_110823_2/' + 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