$OpenBSD: patch-src_pycountry_db_py,v 1.1.1.1 2011/12/18 13:42:31 mpi Exp $

http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=599369

--- src/pycountry/db.py.orig	Fri Jul 15 10:54:22 2011
+++ src/pycountry/db.py	Tue Dec  6 12:19:29 2011
@@ -7,7 +7,17 @@
 import logging
 from xml.dom import minidom
 
+# NullHandler is only defined for python >= 2.7
+if 'NullHandler' not in dir(logging):
+    class NullHandler(logging.Handler):
+        def emit(self, record):
+            pass
+    logging.NullHandler = NullHandler
+
 logger = logging.getLogger('pycountry.db')
+# Prevent warning, see
+# http://docs.python.org/library/logging.html#configuring-logging-for-a-library
+logger.addHandler(logging.NullHandler())
 
 
 class Data(object):
