Commits

david_walker committed f93417a Merge

prevent pycountry logging complaint by adding null handler

Comments (0)

Files changed (1)

 """
 
 import re
-import pycountry
 import unicodedata
 from abc import ABCMeta, abstractmethod
 from collections import namedtuple
 import logging
 
+# Prevent complaint that pycountry doesn't have a logger from going to
+# stderr
+logging.getLogger('pycountry').addHandler(logging.NullHandler())
+import pycountry
+
 AttrChange = namedtuple('AttrChange', 'attr, value')
 
-
 class Relation(object):
     """Namespace for constants used to describe relation between
     transforms.
     abbreviations = [
         AbbrevInfo(ur'e\.g\.'),
         AbbrevInfo(ur'i\.e\.'),
+        AbbrevInfo(ur'a\.m\.'),
+        AbbrevInfo(ur'p\.m\.'),
         AbbrevInfo(ur'etc\.'),
         AbbrevInfo(ur'mr\.', u'Mr.'),
         AbbrevInfo(ur'mrs\.', u'Mrs.'),