equal
deleted
inserted
replaced
2199 except AttributeError: # no symlink in os |
2199 except AttributeError: # no symlink in os |
2200 pass |
2200 pass |
2201 |
2201 |
2202 flags = os.O_CREAT | os.O_WRONLY | os.O_EXCL | getattr(os, 'O_BINARY', 0) |
2202 flags = os.O_CREAT | os.O_WRONLY | os.O_EXCL | getattr(os, 'O_BINARY', 0) |
2203 ld = os.open(pathname, flags) |
2203 ld = os.open(pathname, flags) |
2204 os.write(ld, info) |
2204 try: |
2205 os.close(ld) |
2205 os.write(ld, info) |
|
2206 finally: |
|
2207 os.close(ld) |
2206 |
2208 |
2207 |
2209 |
2208 def readlock(pathname: bytes) -> bytes: |
2210 def readlock(pathname: bytes) -> bytes: |
2209 try: |
2211 try: |
2210 return readlink(pathname) |
2212 return readlink(pathname) |