def trim_custom_directories(repo, older_than_days=None):
 if (not repo):
  return
 if (older_than_days is None):
  older_than_days = settings.get_value('PACKAGES', 'custom_max_age', type=int, default=40)
 cmd = ('find . -type f -atime +%s -exec rm -f {} \\;' % older_than_days)
 repo_run_command(repo, cmd, ignore_status=True)

def trim_custom_directories ( repo , older_than_days = None ) : if ( not repo ) : return if ( older_than_days is None ) : older_than_days = settings . get_value ( 'PACKAGES' , 'custom_max_age' , type = int , default = 40 ) cmd = ( 'find . -type f -atime +%s -exec rm -f {} \\;' % older_than_days ) repo_run_command ( repo , cmd , ignore_status = True )
remove old files from the remote repo directory the age of the files .