From c1f294439c64d27f10f500c97c9062ac2a244d7e Mon Sep 17 00:00:00 2001
From: David Rafferty <rafferty@strw.leidenuniv.nl>
Date: Mon, 29 Oct 2012 11:56:06 +0000
Subject: [PATCH] Task #3743: Fix to pyrap.images calls.

---
 CEP/PyBDSM/src/python/functions.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/CEP/PyBDSM/src/python/functions.py b/CEP/PyBDSM/src/python/functions.py
index d81fc8d42b0..b3769185543 100755
--- a/CEP/PyBDSM/src/python/functions.py
+++ b/CEP/PyBDSM/src/python/functions.py
@@ -1182,8 +1182,8 @@ def convert_pyrap_header(pyrap_image):
     import pyfits
 
     tfile = tempfile.NamedTemporaryFile(delete=False)
-    pyrap_image.tofits(tfile)
-    hdr = pyfits.get_header(tfile)
+    pyrap_image.tofits(tfile.name)
+    hdr = pyfits.get_header(tfile.name)
     return hdr
 
 
-- 
GitLab