개정판 7ae60fb6
issue #000: fix size text
Change-Id: I26684290c431600a4825f645fd1817733350a8fa
DTI_PID/DTI_PID/TextItemFactory.py | ||
---|---|---|
305 | 305 |
first, second = None, None |
306 | 306 |
if text.find('"') is not -1: |
307 | 307 |
first = text[:text.find('"') + 1] |
308 |
|
|
309 |
text = text[text.find('"') + 1:].replace(delimiter.upper(), '', 1).strip() if delimiter is not None else text[text.find('"') + 1:].strip() |
|
310 |
|
|
311 |
if text and text.find('"') is len(text) - 1: |
|
312 |
second = text |
|
308 |
second = text[text.find('"') + 1:].replace(delimiter.upper(), '', 1).strip() if delimiter is not None else text[text.find('"') + 1:].strip() |
|
313 | 309 |
|
314 |
tokens = [first, second] |
|
310 |
tokens = [first, second] if second is not None and len(second) is not 0 else [first]
|
|
315 | 311 |
for token in tokens: |
316 | 312 |
matches = [sizeData for sizeData in pipe_sizes if sizeData.find(token)] |
317 | 313 |
if not matches: return False |
내보내기 Unified diff