Skip to content

Commit

Permalink
Strip whitespace from file hashes
Browse files Browse the repository at this point in the history
  • Loading branch information
james7132 committed Jul 28, 2017
1 parent 2fb0a9a commit 285b52e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/ui.py
Expand Up @@ -224,17 +224,17 @@ async def launcher_update_check(self):
if '--test' in sys.argv or not hasattr(self.config,
'launcher_endpoint'):
return
launcher_hash = sha256_hash(sys.executable)
logging.info('Launcher Hash: %s' % launcher_hash)
launcher_hash = sha256_hash(sys.executable).strip()
logging.info('Launcher Hash: "%s"' % launcher_hash)
url = self.build_path(self.config.launcher_endpoint)
hash_url = url + '.hash'
logging.info('Fetching remote hash from: %s' % hash_url)
# TODO(james7132): Do proper error checking
response = await loop.run_in_executor(self.executor,
requests.get,
hash_url)
remote_launcher_hash = response.text
logging.info('Remote launcher hash: %s' % remote_launcher_hash)
remote_launcher_hash = response.text.strip()
logging.info('Remote launcher hash: "%s"' % remote_launcher_hash)
if remote_launcher_hash == launcher_hash:
return
logging.info('Fetching new launcher from: %s' % url)
Expand Down

0 comments on commit 285b52e

Please sign in to comment.