remove unneeded 'after_first_run' check

This commit is contained in:
Job Evers-Meltzer 2016-10-30 14:46:16 -05:00
parent 1a70a20c8b
commit f03a15d503

View file

@ -276,7 +276,6 @@ class Daemon(AuthJSONRPCServer):
self.log_file = conf.get_log_filename() self.log_file = conf.get_log_filename()
self.current_db_revision = 1 self.current_db_revision = 1
self.session = None self.session = None
self.first_run_after_update = False
self.uploaded_temp_files = [] self.uploaded_temp_files = []
self._session_id = base58.b58encode(generate_id()) self._session_id = base58.b58encode(generate_id())
# TODO: this should probably be passed into the daemon, or # TODO: this should probably be passed into the daemon, or
@ -286,21 +285,8 @@ class Daemon(AuthJSONRPCServer):
self.analytics_manager = None self.analytics_manager = None
self.lbryid = PENDING_LBRY_ID self.lbryid = PENDING_LBRY_ID
self.daemon_conf = os.path.join(self.db_dir, 'daemon_settings.yml') self.daemon_conf = os.path.join(self.db_dir, 'daemon_settings.yml')
if os.path.isfile(self.daemon_conf):
conf_settings = utils.load_settings(self.daemon_conf)
if 'last_version' in conf_settings:
if utils.version_is_greater_than(lbrynet_version, conf_settings['last_version']['lbrynet']):
self.first_run_after_update = True
log.info("First run after update")
log.info("lbrynet %s --> %s", conf_settings['last_version']['lbrynet'], lbrynet_version)
log.info("lbryum %s --> %s", conf_settings['last_version']['lbryum'], lbryum_version)
# utils.save_settings(self.daemon_conf)
self.wallet_user = None self.wallet_user = None
self.wallet_password = None self.wallet_password = None
self.query_handlers = {} self.query_handlers = {}
@ -993,7 +979,6 @@ class Daemon(AuthJSONRPCServer):
d.addCallback(lambda info: int(dict(info)['stream_size']) / 1000000 * self.data_rate) d.addCallback(lambda info: int(dict(info)['stream_size']) / 1000000 * self.data_rate)
d.addCallbacks(_add_key_fee, lambda _: _add_key_fee(0.0)) d.addCallbacks(_add_key_fee, lambda _: _add_key_fee(0.0))
reactor.callLater(self.search_timeout, _check_est, d, name) reactor.callLater(self.search_timeout, _check_est, d, name)
return d return d
def _get_lbry_file_by_uri(self, name): def _get_lbry_file_by_uri(self, name):