|
@@ -15,7 +15,7 @@
|
|
# along with Pwman3; if not, write to the Free Software
|
|
# along with Pwman3; if not, write to the Free Software
|
|
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|
# ============================================================================
|
|
# ============================================================================
|
|
-# Copyright (C) 2012-2014 Oz Nahum <nahumoz@gmail.com>
|
|
|
|
|
|
+# Copyright (C) 2012-2014 Oz Nahum Tiram <nahumoz@gmail.com>
|
|
# ============================================================================
|
|
# ============================================================================
|
|
# Copyright (C) 2006 Ivan Kelly <ivan@ivankelly.net>
|
|
# Copyright (C) 2006 Ivan Kelly <ivan@ivankelly.net>
|
|
# ============================================================================
|
|
# ============================================================================
|
|
@@ -39,13 +39,14 @@ def main(args):
|
|
dbver = get_db_version(config, dbtype, args)
|
|
dbver = get_db_version(config, dbtype, args)
|
|
CryptoEngine.get(dbver)
|
|
CryptoEngine.get(dbver)
|
|
|
|
|
|
|
|
+ fname = config.get_value('Database', 'filename')
|
|
|
|
+ db = pwman.data.factory.create(dbtype, dbver, fname)
|
|
|
|
+
|
|
if args.import_file:
|
|
if args.import_file:
|
|
- importer = Importer(args, config)
|
|
|
|
|
|
+ importer = Importer(args, config, db)
|
|
importer.run()
|
|
importer.run()
|
|
sys.exit(0)
|
|
sys.exit(0)
|
|
|
|
|
|
- fname = config.get_value('Database', 'filename')
|
|
|
|
- db = pwman.data.factory.create(dbtype, dbver, fname)
|
|
|
|
cli = PwmanCliNew(db, xselpath, CLICallback, config)
|
|
cli = PwmanCliNew(db, xselpath, CLICallback, config)
|
|
|
|
|
|
try:
|
|
try:
|