@@ -55,6 +55,8 @@ def do_add_parser(self, parser_adder):
55
55
- type: type of blob
56
56
- version: version string
57
57
- license_path: path to the license file for the blob
58
+ - license-abspath: absolute path to the license file for the blob
59
+ - click-through: need license click-through or not
58
60
- uri: URI to the remote location of the blob
59
61
- description: blob text description
60
62
- doc-url: URL to the documentation for this blob
@@ -151,6 +153,33 @@ def fetch(self, args):
151
153
self .dbg ('Blob {module}: {abspath} is up to date' .format (** blob ))
152
154
continue
153
155
self .inf ('Fetching blob {module}: {abspath}' .format (** blob ))
156
+
157
+ if blob ['click-through' ]:
158
+ while True :
159
+ user_input = input ("For this blob, need to read and accept "
160
+ "license to continue. Read it?\n "
161
+ "Please type 'y' or 'n' and press enter to confirm: " )
162
+ if user_input .upper () == "Y" or user_input .upper () == "N" :
163
+ break
164
+
165
+ if user_input .upper () != "Y" :
166
+ self .wrn ('Skip fetching this blob.' )
167
+ continue
168
+
169
+ with open (blob ['license-abspath' ]) as license_file :
170
+ license_content = license_file .read ()
171
+ print (license_content )
172
+
173
+ while True :
174
+ user_input = input ("Accept license to continue?\n "
175
+ "Please type 'y' or 'n' and press enter to confirm: " )
176
+ if user_input .upper () == "Y" or user_input .upper () == "N" :
177
+ break
178
+
179
+ if user_input .upper () != "Y" :
180
+ self .wrn ('Skip fetching this blob.' )
181
+ continue
182
+
154
183
self .fetch_blob (blob ['url' ], blob ['abspath' ])
155
184
if not self .verify_blob (blob ):
156
185
bad_checksum_count += 1
0 commit comments