[PyWebMail-Checkins] webmail checker_manage.py,1.13,1.14
Status: Beta
Brought to you by:
dubnerm
From: Michael D. <du...@us...> - 2008-03-02 10:54:31
|
Update of /cvsroot/pywebmail/webmail In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21718 Modified Files: checker_manage.py Log Message: - Index: checker_manage.py =================================================================== RCS file: /cvsroot/pywebmail/webmail/checker_manage.py,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** checker_manage.py 6 Dec 2007 10:13:26 -0000 1.13 --- checker_manage.py 2 Mar 2008 10:54:29 -0000 1.14 *************** *** 319,322 **** --- 319,328 ---- return d + def _del(self, root, fn): + f = os.path.join(root,fn) + if self.verbose > 2: + print '-- del', f + if self.doexec: + os.remove(f) def dircleanup(self, d): if self.verbose > 1: *************** *** 325,333 **** for fn in files: if fn[-4:] in ('.pyc','.pyo','.wmc') or fn[-9:] == '$py.class': ! f = os.path.join(root,fn) ! if self.verbose > 2: ! print '-- del', f ! if self.doexec: ! os.remove(f) if 'CVS' in dirs: dirs.remove('CVS') --- 331,338 ---- for fn in files: if fn[-4:] in ('.pyc','.pyo','.wmc') or fn[-9:] == '$py.class': ! self._del(root,fn) ! elif fn[-4:] == '.pdb' and fn[:-4]+'.exe' in files: ! self._del(root,fn) ! self._del(root,fn[:-4]+'.exe') if 'CVS' in dirs: dirs.remove('CVS') *************** *** 347,351 **** --- 352,360 ---- f.close() + _cygpath_cache = {} + def _cygpath(self, key, fn): + if self._cygpath_cache.has_key((key,fn)): + return self._cygpath_cache[(key,fn)] if sys.platform == 'cygwin' and key in 'uw' and ctypes is not None: MAXPATH = 512 *************** *** 361,364 **** --- 370,374 ---- if self.verbose > 0: print '#'+key+'#', fn, '=>', res + self._cygpath_cache[(key,fn)] = res return res |