Feb-06-2021, 12:19 AM
i am doing os.rename() or os.link() which may sometimes cause (on POSIX) system error EXDEV for which there is no specific exception defined in Python. i don't understand the exception system well enough to understand how this kind of exception is handled. when i try it unhandled i get OSError and a correct error message. i just want to handle this error a specific way (such as copying the file) in my script. i've been read about the exception system in the reference document, but it's not saying enough. searches on 3 searches engines just don't hit a case like this (where no exception is defined).
i am currently making a script that works like the mv or ln commands, but creates a directory at the named target.
i am currently making a script that works like the mv or ln commands, but creates a directory at the named target.