diff options
author | dencheva <dencheva@stsci.edu> | 2011-06-03 12:20:08 -0400 |
---|---|---|
committer | dencheva <dencheva@stsci.edu> | 2011-06-03 12:20:08 -0400 |
commit | 7834819cabce695df36b28a25a8561d8104a8a23 (patch) | |
tree | 028a11b3ba60f3ee49bf2f75fb9953d265810697 /wcsutil/getinput.py | |
parent | 8420dd22212d8cd457ff110dc75e702c19b377ed (diff) | |
download | stwcs_hcf-7834819cabce695df36b28a25a8561d8104a8a23.tar.gz |
Raise an error if input to HSTWCS is not a file name or a file object
git-svn-id: http://svn.stsci.edu/svn/ssb/stsci_python/stsci_python/trunk/stwcs@13048 fe389314-cf27-0410-b35b-8c050e845b92
Diffstat (limited to 'wcsutil/getinput.py')
-rw-r--r-- | wcsutil/getinput.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/wcsutil/getinput.py b/wcsutil/getinput.py index 22ed492..a2d9781 100644 --- a/wcsutil/getinput.py +++ b/wcsutil/getinput.py @@ -37,6 +37,9 @@ def parseSingleInput(f=None, ext=None): ehdr = f[extnum].header hdr0 = f[0].header filename = hdr0.get('FILENAME', "") + + else: + raise ValueError('Input must be a file name string or a pyfits file object') return filename, hdr0, ehdr, phdu |