def update(self):
        """Update the command result attributed."""
        # Only continue if monitor list is not empty
        if len(self.__folder_list) == 0:
            return self.__folder_list

        # Iter upon the folder list
        for i in range(len(self.get())):
            # Update folder size
            try:
                self.__folder_list[i]['size'] = self.__folder_size(self.path(i))
            except OSError as e:
                logger.debug('Cannot get folder size ({}). Error: {}'.format(self.path(i), e))
                if e.errno == 13:
                    # Permission denied
                    self.__folder_list[i]['size'] = '!'
                else:
                    self.__folder_list[i]['size'] = '?'

        return self.__folder_list
def update ( self ) : if len ( self . __folder_list ) == 0 : return self . __folder_list for i in range ( len ( self . get ( ) ) ) : try : self . __folder_list [ i ] [ 'size' ] = self . __folder_size ( self . path ( i ) ) except OSError as e : logger . debug ( 'Cannot get folder size ({}). Error: {}' . format ( self . path ( i ) , e ) ) if e . errno == 13 : self . __folder_list [ i ] [ 'size' ] = '!' else : self . __folder_list [ i ] [ 'size' ] = '?' return self . __folder_list
Update the command result attributed.