CAS-14201: Fix bug with mask=[]
If mask is passed in as an empty list, in the case of niter=0 the return
dictionary construction fell over. os.path.exists() wants an empty
string, but if an empty list was passed in it threw a KeyError.
This is now fixed by putting in the appropriate guard rails before it
gets to os.path.exists. The length of the input mask is tested, so
regardless of empty string or list it will catch it there.
Pull request #884: CAS-14439
Merge in CASA/casa6 from CAS-14439 to master
* commit 'f11c3ddeec7842927b187f6a4c9dcee141eab55b':
RChanges according to the NAOJ code review Refs #2721 and Refs #2726 - emove dcolor codes from sdimaging deprecation warning due to log file readability issues
Changes according to the NAOJ code review Refs #2715 - changed line length
Removed test messages from warning
Deprecation warning for sdimaging task - added color highlight
Deprecation warning for sdimaging task