Commits
212 212 | if not _is_valid_url_host(h): |
213 213 | raise ValueError( |
214 214 | f'Parameter hosts: {h} is not a valid host expressed as a URL.' |
215 215 | ) |
216 216 | url = f"{h}?{wsid}" |
217 217 | casalog.post(f"Trying {url} ...", "NORMAL") |
218 218 | antpos = _query(url) |
219 219 | if antpos: |
220 220 | break |
221 221 | if not antpos: |
222 - | raise RuntimeError('All URLs failed to return an antenna position list.') |
222 + | raise RuntimeError("All URLs failed to return an antenna position list.") |
223 223 | if os.path.exists(outfile): |
224 224 | if overwrite: |
225 225 | if os.path.isdir(outfile): |
226 226 | casalog.post(f"Removing existing directory {outfile}", "WARN") |
227 227 | shutil.rmtree(outfile) |
228 228 | else: |
229 229 | casalog.post(f"Removing existing file {outfile}", "WARN") |
230 230 | os.remove(outfile) |
231 231 | else: |
232 232 | raise RuntimeError( |
233 - | "Logic Error: shouldn't have gotten too this point with overwrite=False" |
233 + | "Logic Error: shouldn't have gotten to this point with overwrite=False" |
234 234 | ) |
235 235 | with open(outfile, "w") as f: |
236 236 | json.dump(antpos, f) |