james-see / iptcinfo3

iptcinfo working for python 3 finally do pip3 install iptcinfo3
51 stars 31 forks source link

Fixed file saving error caused by string concatenation #10

Closed Atulin closed 4 years ago

Atulin commented 4 years ago

Replaced + concatenation with .format().

Used to throw the following traceback on Windows when trying to save a file:

Traceback (most recent call last):
  File "C:\Users\Angius\PycharmProjects\fbmangler\venv\lib\site-packages\iptcinfo3.py", line 627, in save
    return self.save_as(self._filename, options)
  File "C:\Users\Angius\PycharmProjects\fbmangler\venv\lib\site-packages\iptcinfo3.py", line 690, in save_as
    shutil.move(newfile, newfile + '~')
TypeError: unsupported operand type(s) for +: 'WindowsPath' and 'str'