Skip to content

Commit

Permalink
fix auth requirement for local files
Browse files Browse the repository at this point in the history
  • Loading branch information
rwegener2 committed Nov 21, 2023
1 parent c77de88 commit 454e30b
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions icepyx/core/variables.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,14 @@ def __init__(
# Set the product and version from either the input args or the file
if path:
self._path = val.check_s3bucket(path)
self._product = is2ref.extract_product(self._path, auth=self.auth)
self._version = is2ref.extract_version(self._path, auth=self.auth)
# Set up auth
if self._path.startswith('s3'):
auth = self.auth
else:
auth = None
# Read the product and version from the file
self._product = is2ref.extract_product(self._path, auth=auth)
self._version = is2ref.extract_version(self._path, auth=auth)
elif product:
# Check for valid product string
self._product = is2ref._validate_product(product)
Expand Down

0 comments on commit 454e30b

Please sign in to comment.