Skip to content

Commit

Permalink
fix back exist_ok (#1059)
Browse files Browse the repository at this point in the history
Co-authored-by: 孙圣翔²⁰₂₁ <oncwnuImVQzmrqH0o4rQfDVAePRA@git.weixin.qq.com>
  • Loading branch information
codeskyblue and 孙圣翔²⁰₂₁ authored Dec 5, 2024
1 parent 9336c29 commit 3354a89
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions uiautomator2/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -210,18 +210,14 @@ def push(self, src, dst: str, mode=0o644):
"""
self._dev.sync.push(src, dst, mode=mode)

def pull(self, src: str, dst: str, exist_ok: bool = False):
def pull(self, src: str, dst: str):
"""
Pull file from device to local
"""
self._dev.sync.pull(src, dst, exist_ok)

# FIXME: check if windows still need f.close
# with open(dst, 'wb') as f:
# shutil.copyfileobj(r.raw, f)
# if _mswindows: # FIXME: check hotfix windows file size zero bug
# f.close()

try:
self._dev.sync.pull(src, dst, exist_ok=True)
except TypeError:
self._dev.sync.pull(src, dst)

class _Device(_BaseClient):
__orientation = ( # device orientation
Expand Down

0 comments on commit 3354a89

Please sign in to comment.