Skip to content

Commit

Permalink
Merge pull request #1140 from sphuber/fix_1139_verdi_import
Browse files Browse the repository at this point in the history
Fix import error and unnecessary backend check in verdi import
  • Loading branch information
sphuber authored Feb 19, 2018
2 parents 190ee25 + 5bedd01 commit ca5fda2
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions aiida/cmdline/commands/importfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def run(self, *args):
import urllib2

from aiida.common.folders import SandboxFolder
from aiida.orm.importexport import get_valid_import_links, import_data_dj, import_data_sqla
from aiida.orm.importexport import get_valid_import_links, import_data

parser = argparse.ArgumentParser(
prog=self.get_full_command_name(),
Expand Down Expand Up @@ -82,12 +82,7 @@ def run(self, *args):
for filename in files:
try:
print "**** Importing file {}".format(filename)
from aiida.backends.settings import BACKEND
from aiida.backends.profile import BACKEND_DJANGO, BACKEND_SQLA
if BACKEND == BACKEND_SQLA:
import_data_sqla(filename)
elif BACKEND == BACKEND_DJANGO:
import_data_dj(filename)
import_data(filename)
except Exception:
traceback.print_exc()

Expand Down

0 comments on commit ca5fda2

Please sign in to comment.