comparison sat/plugins/plugin_misc_merge_requests.py @ 3875:a0666f17f300

plugin merge-requests: fix `await` use on blocking method
author Goffi <goffi@goffi.org>
date Tue, 23 Aug 2022 13:00:07 +0200
parents 5f65f4e9f8cb
children 524856bd7b19
comparison
equal deleted inserted replaced
3874:c2b292d30c66 3875:a0666f17f300
267 if not data.strip(): 267 if not data.strip():
268 raise exceptions.DataError(_('export data is empty, do you have any ' 268 raise exceptions.DataError(_('export data is empty, do you have any '
269 'change to send?')) 269 'change to send?'))
270 270
271 if not values.get('title') or not values.get('body'): 271 if not values.get('title') or not values.get('body'):
272 patches = await handler.parse(data, values.get(FIELD_DATA_TYPE)) 272 patches = handler.parse(data, values.get(FIELD_DATA_TYPE))
273 commits_msg = patches[-1][self.META_COMMIT_MSG] 273 commits_msg = patches[-1][self.META_COMMIT_MSG]
274 msg_lines = commits_msg.splitlines() 274 msg_lines = commits_msg.splitlines()
275 if not values.get('title'): 275 if not values.get('title'):
276 values['title'] = msg_lines[0] 276 values['title'] = msg_lines[0]
277 if not values.get('body'): 277 if not values.get('body'):