diff --git a/gh_gsql_req.py b/gh_gsql_req.py index 28c9cbd..b708a1b 100644 --- a/gh_gsql_req.py +++ b/gh_gsql_req.py @@ -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: diff --git a/main.py b/main.py index 0cba741..ceb8646 100644 --- a/main.py +++ b/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: