tvalentyn commented on code in PR #31219:
URL: https://github.com/apache/beam/pull/31219#discussion_r1595916298


##########
sdks/python/apache_beam/io/filesystems.py:
##########
@@ -35,28 +38,38 @@
 # pylint: disable=wrong-import-position, unused-import
 try:
   from apache_beam.io.hadoopfilesystem import HadoopFileSystem
-except ImportError:
+except ModuleNotFoundError:

Review Comment:
   ```suggestion
   except ModuleNotFoundError:
     # optional file system packages are not installed.
   ```



##########
sdks/python/apache_beam/io/filesystems.py:
##########
@@ -35,28 +38,38 @@
 # pylint: disable=wrong-import-position, unused-import
 try:
   from apache_beam.io.hadoopfilesystem import HadoopFileSystem
-except ImportError:
+except ModuleNotFoundError:
   pass
+except ImportError as e:
+  _LOGGER.warning("Failed to import HadoopFileSystem; loading of this 
filesystem will be skipped.", e)
 
 try:
   from apache_beam.io.localfilesystem import LocalFileSystem
-except ImportError:
+except ModuleNotFoundError:
   pass
+except ImportError as e:

Review Comment:
   ```suggestion
   except ImportError as e:
     # optional file system packages are installed but failed to load.
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to