products/CPSUid

changeset 25:609ab66c5ca4

better code
author atchertchian
date Wed, 16 Aug 2006 14:36:20 +0000
parents 475f0b8fe40a
children e0fddf7d3079
files uidcounter.py
diffstat 1 files changed, 2 insertions(+), 4 deletions(-) [+]
line diff
     1.1 --- a/uidcounter.py
     1.2 +++ b/uidcounter.py
     1.3 @@ -100,10 +100,8 @@
     1.4          """
     1.5          criteria_dict = {}
     1.6          for mapping in self.criteria:
     1.7 -            sep_index = mapping.find(' ')
     1.8 -            if sep_index != -1:
     1.9 -                key = mapping[:sep_index]
    1.10 -                value = mapping[sep_index+1:]
    1.11 +            if ' ' in mapping:
    1.12 +                key, value = mapping.split(' ', 1)
    1.13                  criteria_dict[key] = value
    1.14          return criteria_dict
    1.15