From 1ea16652ceb59f2dee2870af87d2adf4e22e75ff Mon Sep 17 00:00:00 2001 From: hack Date: Thu, 27 Oct 2011 19:46:37 +0000 Subject: Corrects errors in calling 'fileutil.countExtn()' by actually importing 'fileutil' into the updatewcs.utils module. git-svn-id: http://svn.stsci.edu/svn/ssb/stsci_python/stsci_python/trunk/stwcs@13916 fe389314-cf27-0410-b35b-8c050e845b92 --- lib/stwcs/updatewcs/utils.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'lib/stwcs/updatewcs/utils.py') diff --git a/lib/stwcs/updatewcs/utils.py b/lib/stwcs/updatewcs/utils.py index b761efc..92966da 100644 --- a/lib/stwcs/updatewcs/utils.py +++ b/lib/stwcs/updatewcs/utils.py @@ -1,6 +1,8 @@ from __future__ import division # confidence high import os +from stsci.tools import fileutil + def diff_angles(a,b): """ Perform angle subtraction a-b taking into account @@ -118,7 +120,7 @@ def build_npolname(fobj): try: npolfile = extract_rootname(fobj[0].header["NPOLFILE"]) except KeyError: - if countExtn(f, 'WCSDVARR'): + if fileutil.countExtn(f, 'WCSDVARR'): npolfile = 'UNKNOWN' else: npolfile = 'NOMODEL' @@ -128,7 +130,7 @@ def build_d2imname(fobj): try: d2imfile = extract_rootname(fobj[0].header["D2IMFILE"]) except KeyError: - if countExtn(f, 'D2IMARR'): + if fileutil.countExtn(f, 'D2IMARR'): d2imfile = 'UNKNOWN' else: d2imfile = 'NOMODEL' -- cgit