dtmilano / AndroidViewClient

Android ViewServer and ADB client
Apache License 2.0
1.61k stars 344 forks source link

UnboundLocalError: local variable 'currentFocus' referenced before assignment #148

Closed huttarichard closed 8 years ago

huttarichard commented 9 years ago

I don't know why, but sometimes, I got error... UnboundLocalError: local variable 'currentFocus' referenced before assignment

https://github.com/dtmilano/AndroidViewClient/blob/master/src/com/dtmilano/android/adb/adbclient.py#L970

File "/Library/Python/2.7/site-packages/androidviewclient-10.5.1-py2.7.egg/com/dtmilano/android/adb/adbclient.py", line 996, in getFocusedWindowName window = self.getFocusedWindow() File "/Library/Python/2.7/site-packages/androidviewclient-10.5.1-py2.7.egg/com/dtmilano/android/adb/adbclient.py", line 982, in getFocusedWindow for window in self.getWindows().values(): File "/Library/Python/2.7/site-packages/androidviewclient-10.5.1-py2.7.egg/com/dtmilano/android/adb/adbclient.py", line 967, in getWindows if currentFocus in windows and windows[currentFocus].visibility == 0:

is this known issue, or should I just deal with this by myself?