@@ -190,7 +190,8 @@ def main():
190
190
rest_repo = g .get_repo ('Azure/azure-rest-api-specs' )
191
191
sdk_repo = g .get_repo ('Azure/azure-sdk-for-python' )
192
192
label1 = request_repo .get_label ('ManagementPlane' )
193
- open_issues = request_repo .get_issues (state = 'open' , labels = [label1 ])
193
+ label2 = request_repo .get_label ('Python' )
194
+ open_issues = request_repo .get_issues (state = 'open' , labels = [label1 , label2 ])
194
195
issue_status = []
195
196
issue_status_python = []
196
197
duplicated_issue = dict ()
@@ -205,9 +206,13 @@ def main():
205
206
issue .link = f'https://github.com/Azure/sdk-release-request/issues/{ item .number } '
206
207
issue .author = item .user .login
207
208
issue .package = _extract (item .body .split ('\n ' ), 'azure-.*' )
208
- issue .target_date = [x .split (':' )[- 1 ].strip () for x in item .body .split ('\n ' ) if 'Target release date' in x ][0 ]
209
- issue .days_from_target = int (
210
- (time .mktime (time .strptime (issue .target_date , '%Y-%m-%d' )) - time .time ()) / 3600 / 24 )
209
+ try :
210
+ issue .target_date = [x .split (':' )[- 1 ].strip () for x in item .body .split ('\n ' ) if 'Target release date' in x ][0 ]
211
+ issue .days_from_target = int (
212
+ (time .mktime (time .strptime (issue .target_date , '%Y-%m-%d' )) - time .time ()) / 3600 / 24 )
213
+ except Exception :
214
+ issue .target_date = 'fail to get.'
215
+ issue .days_from_target = 1000 # make a ridiculous data to remind failure when error happens
211
216
issue .create_date = item .created_at .timestamp ()
212
217
issue .delay_from_create_date = int ((time .time () - item .created_at .timestamp ()) / 3600 / 24 )
213
218
issue .latest_update = item .updated_at .timestamp ()
0 commit comments