# HG changeset patch # User Marcin Kuzminski # Date 1351203921 -7200 # Node ID c400f2fbf1310bc5b991dbde27ce59236b674700 # Parent 08f89c688592414566b4311da195a8953a767822 cleanup script walks recursive on dirs to find repos to cleanup diff -r 08f89c688592 -r c400f2fbf131 rhodecode/lib/cleanup.py --- a/rhodecode/lib/cleanup.py Fri Oct 26 00:13:55 2012 +0200 +++ b/rhodecode/lib/cleanup.py Fri Oct 26 00:25:21 2012 +0200 @@ -88,9 +88,10 @@ repos_location = RhodeCodeUi.get_repos_location() to_remove = [] - for loc in os.listdir(repos_location): - if REMOVED_REPO_PAT.match(loc): - to_remove.append([loc, self._extract_date(loc)]) + for dn, dirs, f in os.walk(str(repos_location)): + for loc in dirs: + if REMOVED_REPO_PAT.match(loc): + to_remove.append([loc, self._extract_date(loc)]) #filter older than (if present)! now = datetime.datetime.now()