arguments,configuration: fstring in use

This commit is contained in:
Samuel Husso 2018-06-04 12:35:51 +03:00
parent faeda0e70c
commit 1e1be6bc3f
2 changed files with 3 additions and 4 deletions

View File

@ -72,7 +72,7 @@ class Arguments(object):
self.parser.add_argument( self.parser.add_argument(
'--version', '--version',
action='version', action='version',
version='%(prog)s {}'.format(__version__), version=f'%(prog)s {__version__}'
) )
self.parser.add_argument( self.parser.add_argument(
'-c', '--config', '-c', '--config',

View File

@ -236,9 +236,8 @@ class Configuration(object):
exchange = config.get('exchange', {}).get('name').lower() exchange = config.get('exchange', {}).get('name').lower()
if exchange not in ccxt.exchanges: if exchange not in ccxt.exchanges:
exception_msg = 'Exchange "{}" not supported.\n' \ exception_msg = f'Exchange "{exchange}" not supported.\n' \
'The following exchanges are supported: {}'\ f'The following exchanges are supported: {", ".join(ccxt.exchanges)}'
.format(exchange, ', '.join(ccxt.exchanges))
logger.critical(exception_msg) logger.critical(exception_msg)
raise OperationalException( raise OperationalException(