Permalink
Browse files

Bugfix: Do not raise exception on loading failure (nwcsaf_pps)

  • Loading branch information...
1 parent c17c12d commit df72437c52c9cba3f3f7e52c072310f72d1477ac @mraspaud committed Apr 18, 2012
Showing with 8 additions and 7 deletions.
  1. +8 −7 mpop/satin/nwcsaf_pps.py
View
@@ -136,6 +136,7 @@ def project(self, coverage):
# Project the data
for var in self._projectables:
+ LOG.info("Projecting " + str(var))
res.__dict__[var] = copy.copy(self.__dict__[var])
res.__dict__[var].data = coverage.project_array(
self.__dict__[var].data)
@@ -331,15 +332,15 @@ def load(scene, **kwargs):
file_list = glob.glob(filename_tmpl)
if len(file_list) > 1:
- raise IOError("More than 1 file matching for " + product + "!")
+ LOG.warning("More than 1 file matching for " + product + "!")
elif len(file_list) == 0:
- raise IOError("No " + product + " matching!: " + filename_tmpl)
-
- filename = file_list[0]
+ LOG.warning("No " + product + " matching!: " + filename_tmpl)
+ else:
+ filename = file_list[0]
- chn = classes[product]()
- chn.read(filename)
- scene.channels.append(chn)
+ chn = classes[product]()
+ chn.read(filename)
+ scene.channels.append(chn)
LOG.info("Loading PPS parameters done.")

0 comments on commit df72437

Please sign in to comment.