Skip to content

Commit fae5bf0

Browse files
committed
Check for empty values in windows dump
- Version 5.4.6
1 parent f4cd30f commit fae5bf0

2 files changed

Lines changed: 12 additions & 4 deletions

File tree

AndroidViewClient/setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
from setuptools import setup, find_packages
44

55
setup(name='androidviewclient',
6-
version='5.4.5',
6+
version='5.4.6',
77
description='''AndroidViewClient is a 100% pure python tool that
88
simplifies test script creation providing higher level operations and the ability of
99
obtaining the tree of Views present at any given moment on the device or emulator screen.

AndroidViewClient/src/com/dtmilano/android/viewclient.py

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# -*- coding: utf-8 -*-
22
'''
3-
Copyright (C) 2012-2013 Diego Torres Milano
3+
Copyright (C) 2012-2014 Diego Torres Milano
44
Created on Feb 2, 2012
55
66
Licensed under the Apache License, Version 2.0 (the "License");
@@ -18,7 +18,7 @@
1818
@author: Diego Torres Milano
1919
'''
2020

21-
__version__ = '5.4.3'
21+
__version__ = '5.4.6'
2222

2323
import sys
2424
import warnings
@@ -2003,7 +2003,15 @@ def list(self, sleep=1):
20032003
break
20042004
if doneRE.search(line):
20052005
break
2006-
(wid, package) = line.split()
2006+
values = line.split()
2007+
if len(values) > 1:
2008+
package = values[1]
2009+
else:
2010+
package = "UNKNOWN"
2011+
if len(values) > 0:
2012+
wid = values[0]
2013+
else:
2014+
wid = '00000000'
20072015
self.windows[int('0x' + wid, 16)] = package
20082016
return self.windows
20092017

0 commit comments

Comments
 (0)