mirror of
https://github.com/freqtrade/freqtrade.git
synced 2024-11-10 10:21:59 +00:00
impoved argument and exception handling in scripts/get_market_pairs.py
This commit is contained in:
parent
93ebf163cb
commit
902ffa6853
|
@ -1,5 +1,6 @@
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
|
import traceback
|
||||||
|
|
||||||
root = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
|
root = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
|
||||||
sys.path.append(root + '/python')
|
sys.path.append(root + '/python')
|
||||||
|
@ -49,6 +50,11 @@ def print_supported_exchanges():
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
|
||||||
|
if len(sys.argv) < 2:
|
||||||
|
dump("Usage: python " + sys.argv[0], green('id'))
|
||||||
|
print_supported_exchanges()
|
||||||
|
sys.exit(1)
|
||||||
|
|
||||||
id = sys.argv[1] # get exchange id from command line arguments
|
id = sys.argv[1] # get exchange id from command line arguments
|
||||||
|
|
||||||
# check if the exchange is supported by ccxt
|
# check if the exchange is supported by ccxt
|
||||||
|
@ -87,5 +93,7 @@ try:
|
||||||
|
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
dump('[' + type(e).__name__ + ']', str(e))
|
dump('[' + type(e).__name__ + ']', str(e))
|
||||||
|
dump(traceback.format_exc())
|
||||||
dump("Usage: python " + sys.argv[0], green('id'))
|
dump("Usage: python " + sys.argv[0], green('id'))
|
||||||
print_supported_exchanges()
|
print_supported_exchanges()
|
||||||
|
sys.exit(1)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user