Changeset 2830:9df1958285a4 in livinglogic.python.xist

Show
Ignore:
Timestamp:
07/31/07 13:58:17 (12 years ago)
Author:
Walter Doerwald <walter@…>
Branch:
default
Message:

xfind.css now accepts Selector objects directly.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • src/ll/xist/xfind.py

    r2829 r2830  
    7777    import cssutils 
    7878    from cssutils.css import cssstylerule 
     79    from cssutils.css import selector as cssselector 
    7980    from cssutils.css import cssnamespacerule 
    8081except ImportError: 
     
    16291630    elif isinstance(selectors, cssstylerule.CSSStyleRule): 
    16301631        selectors = selectors.selectorList 
     1632    elif isinstance(selectors, cssselector.Selector): 
     1633        selectors = [selectors] 
    16311634    else: 
    16321635        raise TypeError("can't handle %r" % type(selectors))