dagwieers/unoconv — Issue #17: Exception if file doesn't exist
Author: Sworddragon
Created: 2011-12-24 20:36:57+00:00
State: open

I'm using unoconv 0.4 and if I want to convert a file whcih doesn't exist I get an exception:

>unoconv /tmp/test.odt

Will give me:

>unoconv: file `/tmp/test.odt' does not exist.
unoconv: UnoException during conversion in : URL seems to be an unsupported one.
Traceback (most recent call last):
File "/usr/bin/unoconv", line 790, in
main()
File "/usr/bin/unoconv", line 769, in main
convertor.convert(inputfn)
File "/usr/bin/unoconv", line 679, in convert
error("ERROR: The provided document cannot be converted to the desired format. (code: %s)" % e.ErrCode)
File "/usr/lib/python2.7/dist-packages/uno.py", line 320, in _uno_struct__getattr__
return __builtin__.getattr(self.__dict__["value"],name)
AttributeError: ErrCode

This exception prevents unoconv from closing successfully OpenOffice. I still have oosplash.bin and soffice.bin in the background open which will prevent OpenOffice to start a new instance.