Show More
@@ -182,14 +182,16 b' def checklink(path):' | |||||
182 | # link creation might race, try again |
|
182 | # link creation might race, try again | |
183 | if inst[0] == errno.EEXIST: |
|
183 | if inst[0] == errno.EEXIST: | |
184 | continue |
|
184 | continue | |
|
185 | raise | |||
|
186 | finally: | |||
|
187 | fd.close() | |||
|
188 | except AttributeError: | |||
|
189 | return False | |||
|
190 | except OSError as inst: | |||
185 |
|
|
191 | # sshfs might report failure while successfully creating the link | |
186 |
|
|
192 | if inst[0] == errno.EIO and os.path.exists(name): | |
187 |
|
|
193 | os.unlink(name) | |
188 |
|
|
194 | return False | |
189 | finally: |
|
|||
190 | fd.close() |
|
|||
191 | except AttributeError: |
|
|||
192 | return False |
|
|||
193 |
|
195 | |||
194 | def checkosfilename(path): |
|
196 | def checkosfilename(path): | |
195 | '''Check that the base-relative path is a valid filename on this platform. |
|
197 | '''Check that the base-relative path is a valid filename on this platform. |
General Comments 0
You need to be logged in to leave comments.
Login now