Skip to content

Commit

Permalink
Merge branch 'main' into getfix
Browse files Browse the repository at this point in the history
  • Loading branch information
turetske authored Aug 18, 2024
2 parents aee2e1e + 0b807e8 commit 9203250
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
12 changes: 5 additions & 7 deletions src/pelicanfs/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -390,6 +390,11 @@ async def _isdir(self, path):
async def _find(self, path, maxdepth=None, withdirs=False, **kwargs):
results = await self.httpFileSystem._find(path, maxdepth, withdirs, **kwargs)
return self._remove_host_from_paths(results)

@_dirlist_dec
async def _info(self, path, **kwargs):
results = await self.httpFileSystem._info(path, **kwargs)
return self._remove_host_from_paths(results)

async def _isfile(self, path):
return not await self._isdir(path)
Expand Down Expand Up @@ -467,12 +472,6 @@ async def _glob(self, path, maxdepth=None, **kwargs):
else:
return list(out)


@_dirlist_dec
async def _info(self, path, **kwargs):
results = await self.httpFileSystem._info(path, **kwargs)
return self._remove_host_from_paths(results)

@_dirlist_dec
async def _du(self, path, total=True, maxdepth=None, **kwargs):
return await self.httpFileSystem._du(path, total, maxdepth, **kwargs)
Expand Down Expand Up @@ -627,7 +626,6 @@ async def _get_file(self, rpath, lpath, **kwargs):
async def _get(self, rpath, lpath, **kwargs):
results = await self.httpFileSystem._get(rpath, lpath, **kwargs)
return self._remove_host_from_paths(results)


@_cache_multi_dec
async def _cat(self, path, recursive=False, on_error="raise", batch_size=None, **kwargs):
Expand Down
1 change: 1 addition & 0 deletions test/test_director.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,7 @@ def test_info(httpserver: HTTPServer, get_client):
"X-Pelican-Namespace": "namespace=/foo"
},
)
httpserver.expect_oneshot_request("/foo/bar", method="HEAD").respond_with_data(listing_response)
httpserver.expect_request("/foo/bar", method="GET").respond_with_data(listing_response)
pelfs = pelicanfs.core.PelicanFileSystem(
httpserver.url_for("/"),
Expand Down

0 comments on commit 9203250

Please sign in to comment.