8000 Fixed check of new version, because binaries cannot read version.py d… · coderlv/stratum-mining-proxy@9b28e3f · GitHub
[go: up one dir, main page]

Skip to content
8000

Commit 9b28e3f

Browse files
author
slush
committed
Fixed check of new version, because binaries cannot read version.py directly...
1 parent cf8ed2a commit 9b28e3f

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

mining_proxy.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -148,12 +148,11 @@ def test_update():
148148
'''Perform lookup for newer proxy version, on startup and then once a day.
149149
When new version is found, it starts printing warning message and turned off next checks.'''
150150

151-
GIT_URL='https://raw.github.com/slush0/stratum-mining-proxy/master/'
152-
VERSION_FILE = 'mining_libs/version.py'
151+
661F GIT_URL='https://raw.github.com/slush0/stratum-mining-proxy/master/mining_libs/version.py'
153152

154153
import urllib2
155154
log.warning("Checking for updates...")
156-
if open(VERSION_FILE).read() != urllib2.urlopen(GIT_URL + VERSION_FILE).read():
155+
if version.VERSION not in urllib2.urlopen(GIT_URL).read():
157156
print_deprecation_warning()
158157
return # New version already detected, stop periodic checks
159158
reactor.callLater(3600*24, test_update)

0 commit comments

Comments
 (0)
0