Repository: climate
Updated Branches:
  refs/heads/master d94bbdc05 -> 54986818e


Remove redundant code


Project: http://git-wip-us.apache.org/repos/asf/climate/repo
Commit: http://git-wip-us.apache.org/repos/asf/climate/commit/a4777fb6
Tree: http://git-wip-us.apache.org/repos/asf/climate/tree/a4777fb6
Diff: http://git-wip-us.apache.org/repos/asf/climate/diff/a4777fb6

Branch: refs/heads/master
Commit: a4777fb604264cafacd19168709e143c61a8e1c0
Parents: aaa3bc5
Author: Ibrahim <jarifibra...@gmail.com>
Authored: Mon Jun 13 13:14:46 2016 +0530
Committer: Ibrahim <jarifibra...@gmail.com>
Committed: Tue Jun 14 01:15:55 2016 +0530

----------------------------------------------------------------------
 ocw/data_source/local.py | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/climate/blob/a4777fb6/ocw/data_source/local.py
----------------------------------------------------------------------
diff --git a/ocw/data_source/local.py b/ocw/data_source/local.py
index f4844f9..0fa81b1 100644
--- a/ocw/data_source/local.py
+++ b/ocw/data_source/local.py
@@ -228,12 +228,13 @@ def load_file(file_path,
 
     try:
         netcdf = netCDF4.Dataset(file_path, mode='r')
-    except RuntimeError:
+    except IOError:
         err = "Dataset filepath is invalid. Please ensure it is correct."
         raise ValueError(err)
     except:
         err = (
-            "The given file cannot be loaded. Please ensure that it is a valid 
"
+            "The given file cannot be loaded. Either the path is invalid or 
the given file is invalid. "
+            "Please ensure that it is a valid "
             "NetCDF file. If problems persist, report them to the project's "
             "mailing list."
         )

Reply via email to