# -*- coding: utf-8 -*-
#
# Copyright (C) 2006-2007 Edgewall Software
# All rights reserved.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms
# are also available at http://genshi.edgewall.org/wiki/License.
#
# This software consists of voluntary contributions made by many
# individuals. For the exact contribution history, see the revision
# history and logs, available at http://genshi.edgewall.org/log/.

"""This package provides various means for generating and processing web markup
(XML or HTML).

The design is centered around the concept of streams of markup events (similar
in concept to SAX parsing events) which can be processed in a uniform manner
independently of where or how they are produced.
"""

__docformat__ = 'restructuredtext en'
try:
    __version__ = __import__('pkg_resources').get_distribution('Genshi').version
except ImportError:
    pass

from genshi.core import *
from genshi.input import ParseError, XML, HTML

@@ -47,9 +47,9 @@
 -200
-7
+8
  Edg
@@ -847,113 +847,251 @@
     
-__version__ = __import__('pkg_resources').get_distribution('Genshi').version%0Aexcept ImportError:%0A    pass
+from pkg_resources import get_distribution, ResolutionError%0A    try:%0A        __version__ = get_distribution('Genshi').version%0A    except ResolutionError:%0A        __version__ = None # unknown%0Aexcept ImportError:%0A    __version__ = None # unknown
 %0A%0Afr

Make the code that retrieves the Genshi version via `pkg_resources` handle the case of missing egg metadata more gracefully. Closes #241.