jflesch/paperwork — pull request #162 by kigeia (2013-05-16 16:58:37+00:00)
Title: Remove a rename exception when setting a new doc_id

Changing docid: /home/user/papers/20130511_2021_43_00 -> /home/user/papers/20130511_2021_43_00
Workers: [Importing file] ended
Worker [Importing file] raised an exception: [Errno 2] Aucun fichier ou dossier de ce type
Traceback (most recent call last):
File "/home/user/paperwork/src/paperwork/frontend/workers.py", line 47, in run
worker._wrapper(**kwargs)
File "/home/user/paperwork/src/paperwork/frontend/workers.py", line 154, in _wrapper
self.__last_ret_value = BasicWorker._wrapper(self, **kwargs)
File "/home/user/paperwork/src/paperwork/frontend/workers.py", line 105, in _wrapper
return self.do(**kwargs)
File "/home/user/paperwork/src/paperwork/frontend/mainwindow.py", line 689, in do
self.__main_win.doc)
File "/home/user/paperwork/src/paperwork/backend/docimport.py", line 126, in import_doc
doc.docid += ("_%02d" % idx)
File "/home/user/paperwork/src/paperwork/backend/common/doc.py", line 279, in __set_docid
os.rename(self.path, new_docpath)