| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -36,7 +36,10 @@ class FileLock(object): | |||
| 36 | 36 | On platforms without fcntl, all operations in this class are no-ops. | |
| 37 | 37 | """ | |
| 38 | 38 | ||
| 39 | - def __init__(self, fd, mode=fcntl.LOCK_EX): | ||
| 39 | + def __init__(self, fd, mode=None): | ||
| 40 | + if has_fcntl and mode is None: | ||
| 41 | + mode = fcntl.LOCK_EX | ||
| 42 | + | ||
| 40 | 43 | self.fd = fd | |
| 41 | 44 | self.mode = mode | |
| 42 | 45 | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments