Commit 44c2ff7
committed
operations/files.put: fix files.put(mode=True)
Fixes pyinfra-dev#1337 which occurs due a type mismatch between the
local file mode returned by get_path_permissions_mode() in api/util.py (str),
and the mode data type from the remote file fact (int).
Make the change in api/util.py to return an int so the behavior both matches the
function's docstring and the implied semantics within put() in
operations/files.py.1 parent fefa4f3 commit 44c2ff7
File tree
2 files changed
+30
-1
lines changed- pyinfra/api
- tests/operations/files.put
2 files changed
+30
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
425 | 425 | | |
426 | 426 | | |
427 | 427 | | |
428 | | - | |
| 428 | + | |
429 | 429 | | |
430 | 430 | | |
431 | 431 | | |
| |||
Lines changed: 29 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
0 commit comments