mirror of
https://github.com/freqtrade/freqtrade.git
synced 2024-11-10 18:23:55 +00:00
Use exists instead of is_file
This commit is contained in:
parent
a3144cb2f0
commit
8a030e7fc0
|
@ -65,7 +65,7 @@ class JsonDataHandler(IDataHandler):
|
||||||
:return: DataFrame with ohlcv data, or empty DataFrame
|
:return: DataFrame with ohlcv data, or empty DataFrame
|
||||||
"""
|
"""
|
||||||
filename = self._pair_data_filename(self._datadir, pair, timeframe)
|
filename = self._pair_data_filename(self._datadir, pair, timeframe)
|
||||||
if not filename.is_file():
|
if not filename.exists():
|
||||||
return DataFrame(columns=self._columns)
|
return DataFrame(columns=self._columns)
|
||||||
pairdata = read_json(filename, orient='values')
|
pairdata = read_json(filename, orient='values')
|
||||||
pairdata.columns = self._columns
|
pairdata.columns = self._columns
|
||||||
|
@ -149,7 +149,7 @@ class JsonDataHandler(IDataHandler):
|
||||||
:return: True when deleted, false if file did not exist.
|
:return: True when deleted, false if file did not exist.
|
||||||
"""
|
"""
|
||||||
filename = self._pair_trades_filename(self._datadir, pair)
|
filename = self._pair_trades_filename(self._datadir, pair)
|
||||||
if filename.is_file():
|
if filename.exists():
|
||||||
filename.unlink()
|
filename.unlink()
|
||||||
return True
|
return True
|
||||||
return False
|
return False
|
||||||
|
|
Loading…
Reference in New Issue
Block a user