File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -375,13 +375,15 @@ def _get_view_type_mask_for_deprecated_type(type):
375375def test_import_pandas ():
376376 try :
377377 import pandas as pd # noqa F401
378- # used to catch ImportError, but other errors can happen (see SYNPY-177)
379- except : # noqa
380- sys . stderr . write ("""\n \n The pandas package is required for this function!\n
378+ # used to catch when pandas isn't installed
379+ except ModuleNotFoundError :
380+ raise ModuleNotFoundError ("""\n \n The pandas package is required for this function!\n
381381 Most functions in the synapseclient package don't require the
382382 installation of pandas, but some do. Please refer to the installation
383383 instructions at: http://pandas.pydata.org/.
384384 \n \n \n """ )
385+ # catch other errors (see SYNPY-177)
386+ except : # noqa
385387 raise
386388
387389
You can’t perform that action at this time.
0 commit comments