fix dbmigrator pylint issue

This commit is contained in:
Lex Berezhny 2018-11-04 14:16:46 -05:00
parent f4c6dc90c9
commit 1292eb345d

View file

@ -7,21 +7,21 @@ def migrate_db(db_dir, start, end):
current = start current = start
while current < end: while current < end:
if current == 1: if current == 1:
from lbrynet.extras.daemon.migrator.migrate1to2 import do_migration from .migrate1to2 import do_migration
elif current == 2: elif current == 2:
from lbrynet.extras.daemon.migrator.migrate2to3 import do_migration from .migrate2to3 import do_migration
elif current == 3: elif current == 3:
from lbrynet.extras.daemon.migrator.migrate3to4 import do_migration from .migrate3to4 import do_migration
elif current == 4: elif current == 4:
from lbrynet.extras.daemon.migrator.migrate4to5 import do_migration from .migrate4to5 import do_migration
elif current == 5: elif current == 5:
from lbrynet.extras.daemon.migrator.migrate5to6 import do_migration from .migrate5to6 import do_migration
elif current == 6: elif current == 6:
from lbrynet.extras.daemon.migrator.migrate6to7 import do_migration from .migrate6to7 import do_migration
elif current == 7: elif current == 7:
from lbrynet.extras.daemon.migrator.migrate7to8 import do_migration from .migrate7to8 import do_migration
elif current == 8: elif current == 8:
from lbrynet.extras.daemon.migrator import do_migration from .migrate8to9 import do_migration
else: else:
raise Exception("DB migration of version {} to {} is not available".format(current, raise Exception("DB migration of version {} to {} is not available".format(current,
current+1)) current+1))