
__version__ = "2.1.0"

__all__ = [
  'const',
  'exceptions',
  'upload',
  'xmlrunner',
  'types.exceptions',
  'types.dataoneTypes',
  'types.dataoneErrors',
  'ext.mimeparser',
]


__version__ = "2.1.0"

# Set default logging handler to avoid "No handler found" warnings.
import logging

try:
  from logging import NullHandler
except ImportError:
  class NullHandler(logging.Handler):
    def emit(self, record):
      pass

logging.getLogger(__name__).addHandler(NullHandler())

Add logging NullHandler to prevent "no handler found" errors
Add logging NullHandler to prevent "no handler found" errors

This fixes the issue where "no handler found" errors would be printed by
the library if library clients did not set up logging.

  
  __version__ = "2.1.0"
  
+ # Set default logging handler to avoid "No handler found" warnings.
+ import logging
- __all__ = [
-   'const',
-   'exceptions',
-   'upload',
-   'xmlrunner',
-   'types.exceptions',
-   'types.dataoneTypes',
-   'types.dataoneErrors',
-   'ext.mimeparser',
- ]
  
+ try:
+   from logging import NullHandler
+ except ImportError:
+   class NullHandler(logging.Handler):
+     def emit(self, record):
+       pass
+ 
+ logging.getLogger(__name__).addHandler(NullHandler())
+ 
Add logging NullHandler to prevent "no handler found" errors
## Code Before:

__version__ = "2.1.0"

__all__ = [
  'const',
  'exceptions',
  'upload',
  'xmlrunner',
  'types.exceptions',
  'types.dataoneTypes',
  'types.dataoneErrors',
  'ext.mimeparser',
]

## Instruction:
Add logging NullHandler to prevent "no handler found" errors
## Code After:

__version__ = "2.1.0"

# Set default logging handler to avoid "No handler found" warnings.
import logging

try:
  from logging import NullHandler
except ImportError:
  class NullHandler(logging.Handler):
    def emit(self, record):
      pass

logging.getLogger(__name__).addHandler(NullHandler())
