Skip to content
This repository was archived by the owner on Nov 18, 2024. It is now read-only.

Commit e68acfa

Browse files
committed
- Handles missing SSL certs for the terminal download
- Added MS_OF_DAY2 enum
1 parent ede7e5d commit e68acfa

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

thetadata/enums.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ class DataType(enum.Enum):
1616
MS_OF_DAY = (1, False)
1717
CORRECTION = (2, False)
1818
PRICE_TYPE = (4, False)
19+
MS_OF_DAY2 = (5, False)
1920

2021
# QUOTES
2122
BID_SIZE = (101, False)

thetadata/terminal.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,14 @@ def check_download(auto_update: bool) -> bool:
101101
output.close()
102102
return True
103103
except:
104-
print('Unable to fetch the latest terminal version. Please contact support.')
104+
try:
105+
if not os.path.exists('ThetaTerminal.jar') or auto_update:
106+
jar = urllib.request.urlopen("http://download-latest.thetadata.us")
107+
with open('ThetaTerminal.jar', 'wb') as output:
108+
output.write(jar.read())
109+
output.close()
110+
except:
111+
print('Unable to fetch the latest terminal version. Please contact support.')
105112
return False
106113

107114

0 commit comments

Comments
 (0)