driscollis / applications_with_wxpython

Code examples for the book, Creating GUI Application with wxPython
https://www.blog.pythonlibrary.org
117 stars 26 forks source link

Chapter 7 - archiver_v2 question #10

Closed cmcknight closed 5 years ago

cmcknight commented 5 years ago

The code for the modified main() method reads:

def main():
    args = get_args()
    if args.output:
        output = pathlib.Path(args.output)
        input_paths = get_paths(args.input_path)
    else:
        temp = pathlib.Path(args.input_path)
        output = pathlib.Path(f'{temp}.tar')
    controller.create_tar(output, archive_objects=[input_paths]) <--- I forgot to remove the square brackets around input_paths
    print(f'Created tarball from {input_path} to {output}')
cmcknight commented 5 years ago

Disregard, I missed removing the square brackets in the controller.create_tar line.

driscollis commented 5 years ago

Glad you figured this one out