1 # Copyright (c) 2017 The Chromium Authors. All rights reserved. 2 # Use of this source code is governed by a BSD-style license that can be 3 # found in the LICENSE file. 4 5 """ 6 Convenience functions that determine things about runtime environment. 7 8 Avoid adding any unneeded dependencies to this module, since we may want to 9 import it in a variety of unusual environments. 10 """ 11 12 IN_MOD_WSGI = False 13 try: 14 # Per mod_wsgi documentation, this import will only suceed if we are running 15 # inside a mod_wsgi process. 16 # pylint: disable=unused-import 17 from mod_wsgi import version 18 IN_MOD_WSGI = True 19 except: 20 pass 21