aboutsummaryrefslogtreecommitdiffstats
path: root/bsfs/apps/migrate.py
diff options
context:
space:
mode:
authorMatthias Baumgartner <dev@igsor.net>2023-03-05 19:25:29 +0100
committerMatthias Baumgartner <dev@igsor.net>2023-03-05 19:25:29 +0100
commit48b6081d0092e9c5a1b0ad79bdde2e51649bf61a (patch)
tree634198c34aae3c0306ce30ac7452abd7b53a14e8 /bsfs/apps/migrate.py
parent91437ba89d35bf482f3d9671bb99ef2fc69f5985 (diff)
parente4845c627e97a6d125bf33d9e7a4a8d373d7fc4a (diff)
downloadbsfs-48b6081d0092e9c5a1b0ad79bdde2e51649bf61a.tar.gz
bsfs-48b6081d0092e9c5a1b0ad79bdde2e51649bf61a.tar.bz2
bsfs-48b6081d0092e9c5a1b0ad79bdde2e51649bf61a.zip
Merge branch 'develop'v0.23.03
Diffstat (limited to 'bsfs/apps/migrate.py')
-rw-r--r--bsfs/apps/migrate.py12
1 files changed, 4 insertions, 8 deletions
diff --git a/bsfs/apps/migrate.py b/bsfs/apps/migrate.py
index 91c1661..34ea2e7 100644
--- a/bsfs/apps/migrate.py
+++ b/bsfs/apps/migrate.py
@@ -1,9 +1,5 @@
-"""
+#!/usr/bin/env python3
-Part of the BlackStar filesystem (bsfs) module.
-A copy of the license is provided with the project.
-Author: Matthias Baumgartner, 2022
-"""
# imports
import argparse
import json
@@ -42,15 +38,15 @@ def main(argv):
graph = bsfs.Open(config)
# initialize schema
- schema = bsfs.schema.Schema.Empty()
+ schema = bsfs.schema.Schema()
if len(args.schema) == 0:
# assemble schema from standard input
- schema = schema + bsfs.schema.Schema.from_string(sys.stdin.read())
+ schema = schema + bsfs.schema.from_string(sys.stdin.read())
else:
# assemble schema from input files
for pth in args.schema:
with open(pth, mode='rt', encoding='UTF-8') as ifile:
- schema = schema + bsfs.schema.Schema.from_string(ifile.read())
+ schema = schema + bsfs.schema.from_string(ifile.read())
# migrate schema
graph.migrate(schema, not args.remove)