Skip to content

Commit

Permalink
Modified the core code to interact with same package modules correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
turetske committed Apr 16, 2024
1 parent 63856a3 commit fa4e36a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/pelicanfs/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
import fsspec
import fsspec.registry
from fsspec.asyn import AsyncFileSystem
import pelicanfs.dir_header_parser as dir_header_parser
from .dir_header_parser import parse_metalink, get_dirlist_loc
import fsspec.implementations.http as fshttp
import aiohttp
import urllib.parse
Expand Down Expand Up @@ -91,7 +91,7 @@ async def get_working_cache(self, fileloc):
Returns the highest priority cache for the namespace that appears to be owrking
"""
headers = await self.get_director_headers(fileloc)
metalist = dir_header_parser.parse_metalink(headers)[1:]
metalist = parse_metalink(headers)[1:]
while len(metalist) > 0:
updatedUrl = metalist[0][0]
metalist = metalist[1:]
Expand Down Expand Up @@ -122,7 +122,7 @@ async def wrapper(self, *args, **kwargs):
path = args[0]
parsedUrl = urllib.parse.urlparse(path)
headers = await self.get_director_headers(parsedUrl.path)
dirlistloc = dir_header_parser.get_dirlist_loc(headers)
dirlistloc = get_dirlist_loc(headers)
if dirlistloc == None:
raise RuntimeError
listUrl = dirlistloc + "/" + parsedUrl.path
Expand All @@ -146,7 +146,7 @@ async def _find(self, path, maxdepth=None, withdirs=False, **kwargs):
async def _walk(self, path, maxdepth=None, on_error="omit", **kwargs):
parsedUrl = urllib.parse.urlparse(path)
headers = await self.get_director_headers(parsedUrl.path)
dirlistloc = dir_header_parser.get_dirlist_loc(headers)
dirlistloc = get_dirlist_loc(headers)
if dirlistloc == "":
raise RuntimeError
listUrl = dirlistloc + "/" + path
Expand Down

0 comments on commit fa4e36a

Please sign in to comment.