Commits

Bob Garwood authored 3581bd6c52f
CAS-14362 : check that each element of datapath exists before using it in os.path.samefile to check to see if it's the same as measurespath

casatools/src/casatools/__init__.py

Modified
228 228 msgs.append('')
229 229 print_log_messages(msgs, logger, isSevere, verbose=user_verbose)
230 230
231 231 # don't use user_measurespath here if not ok
232 232 if not measures_found:
233 233 user_measurespath = ""
234 234 else:
235 235 # always append measurespath to datapath if not already found there to be used by ctsys.initialize
236 236 add_mp = True
237 237 for apath in user_datapath:
238 - if __os.path.samefile(apath, user_measurespath):
238 + if __os.path.exists(apath) and __os.path.samefile(apath, user_measurespath):
239 239 add_mp = False
240 240 break
241 241 if add_mp:
242 242 user_datapath.append(user_measurespath)
243 243
244 244 ctsys = __utils( )
245 245 ctsys.initialize( __sys.executable, user_measurespath, user_datapath, user_nogui,
246 246 user_agg, user_pipeline, user_cachedir )
247 247
248 248 # try and find the IERS data

Everything looks good. We'll let you know here if there's anything you should know about.

Add shortcut