mirror of
ssh://git.janware.com/janware/proj/jw-pkg
synced 2026-04-24 17:23:36 +02:00
lib.FileContext.put(): Swap params path and content
Swap the positions of the "path" and "content" parameters of put(). Path comes always first, in every path related function I know. Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
parent
94eee5c4bb
commit
64e9fbff59
2 changed files with 4 additions and 4 deletions
|
|
@ -283,8 +283,8 @@ class ExecContext(Base):
|
||||||
|
|
||||||
async def _put(
|
async def _put(
|
||||||
self,
|
self,
|
||||||
content: bytes,
|
|
||||||
path: str,
|
path: str,
|
||||||
|
content: bytes,
|
||||||
wd: str|None,
|
wd: str|None,
|
||||||
throw: bool,
|
throw: bool,
|
||||||
verbose: bool|None,
|
verbose: bool|None,
|
||||||
|
|
|
||||||
|
|
@ -79,8 +79,8 @@ class FileContext(abc.ABC):
|
||||||
|
|
||||||
async def _put(
|
async def _put(
|
||||||
self,
|
self,
|
||||||
content: bytes,
|
|
||||||
path: str,
|
path: str,
|
||||||
|
content: bytes,
|
||||||
wd: str|None,
|
wd: str|None,
|
||||||
throw: bool,
|
throw: bool,
|
||||||
verbose: bool|None,
|
verbose: bool|None,
|
||||||
|
|
@ -94,8 +94,8 @@ class FileContext(abc.ABC):
|
||||||
|
|
||||||
async def put(
|
async def put(
|
||||||
self,
|
self,
|
||||||
content: str,
|
|
||||||
path: str,
|
path: str,
|
||||||
|
content: str,
|
||||||
wd: str|None = None,
|
wd: str|None = None,
|
||||||
throw: bool = True,
|
throw: bool = True,
|
||||||
verbose: bool|None = None,
|
verbose: bool|None = None,
|
||||||
|
|
@ -105,7 +105,7 @@ class FileContext(abc.ABC):
|
||||||
mode: str|None = None,
|
mode: str|None = None,
|
||||||
atomic: bool = False
|
atomic: bool = False
|
||||||
) -> Result:
|
) -> Result:
|
||||||
return await self._put(content, path, wd=wd, throw=throw, verbose=verbose,
|
return await self._put(path, content, wd=wd, throw=throw, verbose=verbose,
|
||||||
title=title, owner=owner, group=group, mode=mode, atomic=atomic)
|
title=title, owner=owner, group=group, mode=mode, atomic=atomic)
|
||||||
|
|
||||||
async def _close(self) -> None:
|
async def _close(self) -> None:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue