Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Sep 17, 2024
1 parent 4c6a713 commit b0dacf1
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/fsspec_xrootd/xrootd.py
Original file line number Diff line number Diff line change
Expand Up @@ -381,17 +381,15 @@ async def _touch(self, path: str, truncate: bool = False, **kwargs: Any) -> None
if not status.ok:
raise OSError(f"Impossible to create file in EOS: {status.message}")
if truncate or not await self._exists(path):
status, _ = await _async_wrap(f.truncate)(
size=0, timeout=self.timeout
)
status, _ = await _async_wrap(f.truncate)(size=0, timeout=self.timeout)
else:
len = await self._info(path)
status, _ = await _async_wrap(f.truncate)(
size=len.get("size"),
timeout=self.timeout,
)
f.close()
else:
else:
if truncate or not await self._exists(path):
status, _ = await _async_wrap(self._myclient.truncate)(
path, size=0, timeout=self.timeout
Expand Down

0 comments on commit b0dacf1

Please sign in to comment.