Ticket #31: simple-chmod.patch

File simple-chmod.patch, 493 bytes (added by ftputiluser, 11 years ago)

Simple patch to add basic chmod to current SVN head (needs more error checking, but WFM)

  • ftputil.py

     
    827827        if not topdown:
    828828            yield top, dirs, nondirs
    829829
     830    def chmod(self,path,perms):
     831        def _real_chmod(self,path,perms):
     832            self._session.voidcmd('SITE CHMOD %d %s'%(perms,path))
     833
     834        ftp_error._try_with_oserror(_real_chmod, self,path, perms)
     835
    830836    #
    831837    # context manager methods
    832838    #