From 7834819cabce695df36b28a25a8561d8104a8a23 Mon Sep 17 00:00:00 2001 From: dencheva Date: Fri, 3 Jun 2011 16:20:08 +0000 Subject: 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 --- wcsutil/getinput.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'wcsutil/getinput.py') 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 -- cgit