|
1 | | -# This file is provided by Epic Games, Inc. and is subject to the license |
2 | | -# file included in this repository. |
| 1 | +# Copyright 2020 GPL Solutions, LLC. All rights reserved. |
| 2 | +# |
| 3 | +# Use of this software is subject to the terms of the GPL Solutions license |
| 4 | +# agreement provided at the time of installation or download, or which otherwise |
| 5 | +# accompanies this software in either electronic or hard copy form. |
| 6 | +# |
3 | 7 |
|
4 | 8 | """ |
5 | 9 | This hook is used override some of the functionality of the :class:`~sgtk.bootstrap.ToolkitManager`. |
|
27 | 31 |
|
28 | 32 | class Bootstrap(get_hook_baseclass()): |
29 | 33 | """ |
30 | | - Override the bootstrap core hook to cache some bundles ourselves. |
| 34 | + Override the bootstrap core hook to cache ourself some bundles. |
31 | 35 | http://developer.shotgunsoftware.com/tk-core/core.html#bootstrap.Bootstrap |
32 | 36 | """ |
33 | | - # List of github repos for which we download releases, with a github token to |
34 | | - # do the download if the repo is private |
| 37 | + # List of github repos for which we download releases, with a token to do |
| 38 | + # the download |
35 | 39 | _download_release_from_github = [ |
36 | 40 | ("ue4plugins/tk-framework-unrealqt", ""), |
37 | 41 | ("GPLgithub/tk-framework-unrealqt", ""), |
@@ -97,7 +101,7 @@ def populate_bundle_cache_entry(self, destination, descriptor, **kwargs): |
97 | 101 | if self.shotgun.config.proxy_handler: |
98 | 102 | # Re-use proxy settings from the Shotgun connection |
99 | 103 | opener = url2.build_opener( |
100 | | - self.parent.shotgun.config.proxy_handler, |
| 104 | + self.shotgun.config.proxy_handler, |
101 | 105 | ) |
102 | 106 | url2.install_opener(opener) |
103 | 107 |
|
@@ -152,13 +156,9 @@ def populate_bundle_cache_entry(self, destination, descriptor, **kwargs): |
152 | 156 |
|
153 | 157 | if not extracted: |
154 | 158 | raise RuntimeError( |
155 | | - "Couldn't retrieve a suitable asset for %s %s from %s" % ( |
156 | | - version, |
157 | | - pname, |
158 | | - [ |
159 | | - a["name"] for a in response_d["assets"] |
160 | | - ] |
161 | | - ) |
| 159 | + "Couldn't retrieve a suitable asset from %s" % [ |
| 160 | + a["name"] for a in response_d["assets"] |
| 161 | + ] |
162 | 162 | ) |
163 | 163 | self.logger.info( |
164 | 164 | "Extracted files: %s from %s" % ( |
@@ -233,7 +233,7 @@ def _download_zip_github_asset(self, asset, destination, token): |
233 | 233 | if self.shotgun.config.proxy_handler: |
234 | 234 | # Re-use proxy settings from the Shotgun connection |
235 | 235 | opener = url2.build_opener( |
236 | | - self.parent.shotgun.config.proxy_handler, |
| 236 | + self.shotgun.config.proxy_handler, |
237 | 237 | auth_handler |
238 | 238 | ) |
239 | 239 | else: |
|
0 commit comments