Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix HTTPS_PROXY env var #82

Merged
merged 1 commit into from Apr 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion client/ayon_shotgrid/addon.py
Expand Up @@ -49,7 +49,7 @@ def create_shotgrid_session(self):
from .lib import credentials

sg_username = os.getenv("AYON_SG_USERNAME")
proxy = os.environ.get("HTTPS_PROXY", "").lstrip("https://")
proxy = os.environ.get("HTTPS_PROXY", "").replace("https://", "")

return credentials.create_sg_session(
self._shotgrid_server_url,
Expand Down
Expand Up @@ -108,7 +108,7 @@ def process(self, instance):
sg_local_storage["mac_path"]
)

file_partial_path = file_partial_path.lstrip("/")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't this replaced by mistake?

This will replace all "/" in path but the lstrip will only remove the leading slash, which seems to be more correct to the fact that we want the partial path.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oops yeah I did a search and replace and I didn't read the full thing, I only meant to change the ones for the proxy

file_partial_path = file_partial_path.replace("/", "")
except ValueError as exc:
raise KnownPublishError(
f"Filepath {local_path} doesn't match the "
Expand Down