Fix persistor activate problem when called in API

Signed-off-by: Hollow Man <hollowman@hollowman.ml>
Closes: #1705
Approved by: <try>
This commit is contained in:
Hollow Man 2020-12-20 01:07:26 +08:00 committed by Atomic Bot
parent b537dca025
commit d5edf5dde3
1 changed files with 2 additions and 0 deletions

View File

@ -316,6 +316,8 @@ class Base(object):
# :api
period = self.conf.metadata_timer_sync
if self._repo_persistor is None:
self._activate_persistor()
persistor = self._repo_persistor
if timer:
if dnf.util.on_metered_connection():