X-Git-Url: http://git.treefish.org/~alex/photosort.git/blobdiff_plain/d615316bb498b3a60dee4ad4ee3bd9247a82182e..4ff31898a4b6230a0d68f98a11e8cd19e361c162:/src/photosort.py?ds=sidebyside diff --git a/src/photosort.py b/src/photosort.py index 8ed4ee7..872724e 100755 --- a/src/photosort.py +++ b/src/photosort.py @@ -4,7 +4,7 @@ import argparse import datetime import logging -from dirhandler import DirHandler +from migrator import Migrator parser = argparse.ArgumentParser(description='Process some integers.') parser.add_argument('SOURCE_DIR', type=str, help='source directory') @@ -28,7 +28,11 @@ else: logging.basicConfig(format='[%(asctime)s] %(levelname)s: %(message)s', level=log_level, datefmt='%m/%d/%Y %H:%M:%S') -handler = DirHandler(args.SOURCE_DIR, args.DEST_DIR) -handler.migrate(args.cleanup) +migrator = Migrator(args.SOURCE_DIR, args.DEST_DIR) + +migrator.migrate(args.cleanup) + if args.cleanup: - handler.cleanup() + migrator.cleanup() + +migrator.close()