Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
:param data: Wizard data
"""
SaleChannel = Pool().get('sale.channel')
channel = SaleChannel(Transaction().context.get('active_id'))
channel.validate_amazon_channel()
res = {}
api = channel.get_amazon_feed_api()
try:
api.get_feed_submission_count().parsed
res['status'] = 'Account settings have been configured correctly'
except mws.MWSError:
res['status'] = "Something went wrong. Please check account " + \
"settings again"
return res