From 15e25a6a24100e4f5caabce041caeefeab0e1e72 Mon Sep 17 00:00:00 2001
From: "(no author)" <(no author)@8a9318a1-56ba-4d59-b755-99d26321be01>
Date: Thu, 3 May 2012 21:20:23 +0000
Subject: [PATCH] adding assert for existance of fill value before it's used;
 this should make failure less cryptic

git-svn-id: https://svn.ssec.wisc.edu/repos/glance/trunk@175 8a9318a1-56ba-4d59-b755-99d26321be01
---
 pyglance/glance/data.py | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/pyglance/glance/data.py b/pyglance/glance/data.py
index 3c36ef5..417a7ba 100644
--- a/pyglance/glance/data.py
+++ b/pyglance/glance/data.py
@@ -332,6 +332,9 @@ class DiffInfoObject (object) :
                                                                                      aDataObject.select_fill_value(),
                                                                                      bDataObject.select_fill_value())
         
+        # we can't continue if we don't have a fill value
+        assert(fill_data_value is not None)
+        
         # construct our diff'ed data set
         raw_diff = np.zeros(shape, dtype=sharedType)
         raw_diff[~valid_in_both] = fill_data_value # throw away invalid data
-- 
GitLab