aboutsummaryrefslogtreecommitdiffstats
path: root/astro
diff options
context:
space:
mode:
Diffstat (limited to 'astro')
-rwxr-xr-xastro/fits/fitscube.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/astro/fits/fitscube.py b/astro/fits/fitscube.py
index 7a03a06..65b410c 100755
--- a/astro/fits/fitscube.py
+++ b/astro/fits/fitscube.py
@@ -100,10 +100,9 @@ class FITSCube:
@property
def header(self):
- try:
- return self.header_
- except AttributeError:
- return fits.Header()
+ if not hasattr(self, "header_"):
+ self.header_ = fits.Header()
+ return self.header_
@header.setter
def header(self, value):