Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/dev' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
fireundubh committed May 30, 2021
2 parents ad03201 + bb124e6 commit d2633e9
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions pyro/Remotes.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,10 @@ def validate_url(url: str) -> bool:
def find_access_token(self, schemeless_url: str) -> Optional[str]:
if self.config:
for section_url in self.config.sections():
if startswith(schemeless_url, section_url, ignorecase=True):
return self.config.get(section_url, 'access_token', fallback=None)
if section_url.casefold() in schemeless_url.casefold():
token = self.config.get(section_url, 'access_token', fallback=None)
if token:
return os.path.expanduser(os.path.expandvars(token))
return None

def fetch_contents(self, url: str, output_path: str) -> Generator:
Expand Down

0 comments on commit d2633e9

Please sign in to comment.