Skip to content

Commit

Permalink
Changed to re.match instead of re.search to avoid the case where a sh…
Browse files Browse the repository at this point in the history
…ort class name e.g. Edit is found within a longer class name e.g. TextEditorWindow.
  • Loading branch information
markm committed Jan 16, 2006
1 parent fd2a729 commit 03bca6a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pywinauto/controls/HwndWrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def WrapHandle(hwnd, isDialog = False):
#print "wrapping:", default_wrapper.Class

for wrapper_name in HwndWrappers:
if re.search(wrapper_name, default_wrapper.Class):
if re.match(wrapper_name, default_wrapper.Class):
return HwndWrappers[wrapper_name](hwnd)

if not isDialog:
Expand Down

0 comments on commit 03bca6a

Please sign in to comment.