Changeset 8:1d977a1d11db in livinglogic.python.pycoco

Show
Ignore:
Timestamp:
10/01/06 23:04:27 (13 years ago)
Author:
Walter Doerwald <walter@…>
Branch:
default
Message:

If all else fails, try the current directory.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • src/pycoco.py

    r7 r8  
    44 
    55try: 
    6     import pkg_resources 
    7 except ImportError: 
    8     css = open(os.path.join(__file__, "coverage.css"), "rb").read() 
    9 else: 
    10     css = pkg_resources.resource_string(__name__, "coverage.css") 
     6    try: 
     7        import pkg_resources 
     8    except ImportError: 
     9        css = open(os.path.join(__file__, "coverage.css"), "rb").read() 
     10    else: 
     11        css = pkg_resources.resource_string(__name__, "coverage.css") 
     12except IOError: 
     13    css = open("coverage.css", "rb").read() 
     14 
    1115 
    1216from ll import sisyphus, url