XS-CBT-backup / xs-cbt-backup

Proof of concept backup program using the Changed Block Tracking APIs of XenServer
7 stars 1 forks source link

Minor fix #11

Closed thomasmck closed 6 years ago

thomasmck commented 6 years ago

Signed-off-by: Thomas Mckelvey thomas.mckelvey@citrix.com

I assume you meant to use "+" here rather than "/"?

TypeError: unsupported operand type(s) for /: 'str' and 'str'

thomasmck commented 6 years ago

Actually just looked through your code and realised you do this in a couple places so is probably not a typo. Gets error messages when I try and run it though.

thomasmck commented 6 years ago

Closed this PR as I don't think it is the fix here but I am confused what <str> / <str> is meant to do, just errors for me.

Also see in a couple places you are doing <str>.mkdir(). However when I google it looks like the format should be os.mkdir(<str>).

thomasmck commented 6 years ago

Ahh I see that you are using a Posix Path that you generate from pathlib.Path. I had just been calling it with a string which was then causing the issues. Will update my code to resolve.

gaborigloi commented 6 years ago

Yep indeed, I'm using path objects: https://docs.python.org/3/library/pathlib.html I think this is a Python 3-only thing, so therefore this code probably only works with Python 3. But probably this isn't a big issue, as Python 2 is EOL in 2020

thomasmck commented 6 years ago

Yeah I am using python3, I just hadn't read through your code properly and had assumed it was a string.