Skip to content
This repository has been archived by the owner on Mar 1, 2019. It is now read-only.

Commit

Permalink
fix display.rotation display is None exception
Browse files Browse the repository at this point in the history
  • Loading branch information
codeskyblue committed Jun 6, 2017
1 parent 0c9991d commit 5a715e0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion atx/adbkit/device.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,8 @@ def rotation(self):
Return:
- int [0-4]
"""
return self.display.rotation
if self.display:
return self.display.rotation

def properties(self):
'''
Expand Down
4 changes: 2 additions & 2 deletions atx/drivers/android.py
Original file line number Diff line number Diff line change
Expand Up @@ -481,11 +481,11 @@ def dump_view(self):
warnings.warn("deprecated, source() instead", DeprecationWarning)
return self._uiauto.dump()

def source(self):
def source(self, *args, **kwargs):
"""
Dump page xml
"""
return self._uiauto.dump()
return self._uiauto.dump(*args, **kwargs)

def _escape_text(self, s, utf7=False):
s = s.replace(' ', '%s')
Expand Down

0 comments on commit 5a715e0

Please sign in to comment.