original_docstring: 
          Pull/push base function.
  
          Function tries request root permissions or remount if required.
  
          Args:
              path (str): Path to file or folder
              file (str): Path to file or folder
              push (bool): 'push' if True 'pull' otherwise
              timeout (int): Timeout in seconds
  
          Keyword args:
              verbose (bool, default :data:`.constants.DEFAULT_MANAGER_COMMAND_VERBOSE`): Print process to output
              allow_root (bool, default True): Allow to root access request if required
              allow_remount (bool, default True): Allow to remount request if required
  
          Todo:
              - Check file exists
              - fix folder to folder path with latest adb
          
docstring: Pull/push base function.
  Function tries request root permissions or remount if required.
docstring_tokens: Pull / push base function . Function tries request root permissions or remount if required .
code: def __push_pull_base(self, path, file, push=True, timeout=None, **kwargs):
          """
          Pull/push base function.
  
          Function tries request root permissions or remount if required.
  
          Args:
              path (str): Path to file or folder
              file (str): Path to file or folder
              push (bool): 'push' if True 'pull' otherwise
              timeout (int): Timeout in seconds
  
          Keyword args:
              verbose (bool, default :data:`.constants.DEFAULT_MANAGER_COMMAND_VERBOSE`): Print process to output
              allow_root (bool, default True): Allow to root access request if required
              allow_remount (bool, default True): Allow to remount request if required
  
          Todo:
              - Check file exists
              - fix folder to folder path with latest adb
          """
          start_time = time()
          first = kwargs.get('first_try', True)
          verbose = kwargs.get('verbose', DEFAULT_MANAGER_COMMAND_VERBOSE)
          allow_root = kwargs.get('allow_root', True)
          allow_remount = kwargs.get('allow_remount', True)
          try:
              if verbose:
                  self.logger.info('%s [%s -> %s]' % ('Pushing' if push else 'Pulling', path, file))
              out = self.adb('%s %s %s' % ('push' if push else 'pull', path, file), timeout=timeout, **kwargs)
          except AccessDeniedError:
              if not first or not allow_root:
                  raise
              # try to get root
              timeout, start_time = self._reduce_timeout(start_time, timeout)
              self.root(timeout=timeout, **kwargs)
              timeout, start_time = self._reduce_timeout(start_time, timeout)
              out = self.__push_pull_base(path=path, file=file, push=push, timeout=timeout, first_try=False)
          except ObjectDoesNotExistError:
              if not first or not allow_remount:
                  raise
              # try to remount
              timeout, start_time = self._reduce_timeout(start_time, timeout)
              self.remount(timeout=timeout, **kwargs)
              timeout, start_time = self._reduce_timeout(start_time, timeout)
              out = self.__push_pull_base(path=path, file=file, push=push, timeout=timeout, first_try=False)
          else:
              if verbose:
                  self.logger.done()
          return out
code_tokens: def __push_pull_base ( self , path , file , push = True , timeout = None , ** kwargs ) : start_time = time ( ) first = kwargs . get ( 'first_try' , True ) verbose = kwargs . get ( 'verbose' , DEFAULT_MANAGER_COMMAND_VERBOSE ) allow_root = kwargs . get ( 'allow_root' , True ) allow_remount = kwargs . get ( 'allow_remount' , True ) try : if verbose : self . logger . info ( '%s [%s -> %s]' % ( 'Pushing' if push else 'Pulling' , path , file ) ) out = self . adb ( '%s %s %s' % ( 'push' if push else 'pull' , path , file ) , timeout = timeout , ** kwargs ) except AccessDeniedError : if not first or not allow_root : raise timeout , start_time = self . _reduce_timeout ( start_time , timeout ) self . root ( timeout = timeout , ** kwargs ) timeout , start_time = self . _reduce_timeout ( start_time , timeout ) out = self . __push_pull_base ( path = path , file = file , push = push , timeout = timeout , first_try = False ) except ObjectDoesNotExistError : if not first or not allow_remount : raise timeout , start_time = self . _reduce_timeout ( start_time , timeout ) self . remount ( timeout = timeout , ** kwargs ) timeout , start_time = self . _reduce_timeout ( start_time , timeout ) out = self . __push_pull_base ( path = path , file = file , push = push , timeout = timeout , first_try = False ) else : if verbose : self . logger . done ( ) return out
short_docstring: Pull/push base function.
short_docstring_tokens: Pull / push base function .
comment: """
          Pull/push base function.
  
          Function tries request root permissions or remount if required.
  
          Args:
              path (str): Path to file or folder
              file (str): Path to file or folder
              push (bool): 'push' if True 'pull' otherwise
              timeout (int): Timeout in seconds
  
          Keyword args:
              verbose (bool, default :data:`.constants.DEFAULT_MANAGER_COMMAND_VERBOSE`): Print process to output
              allow_root (bool, default True): Allow to root access request if required
              allow_remount (bool, default True): Allow to remount request if required
  
          Todo:
              - Check file exists
              - fix folder to folder path with latest adb
          """$SEP$# try to get root$SEP$# try to remount