comparison MoinMoin/wikimacro.py @ 513:b918cb0263bf

fixed bug in SystemInfo imported from: moin--main--1.5--patch-517
author Thomas Waldmann <tw@waldmann-edv.de>
date Sun, 26 Mar 2006 22:08:43 +0000
parents e1990b501b22
children fb4240ec8361 4840926790f5
comparison
equal deleted inserted replaced
512:3ede5fa7001a 513:b918cb0263bf
368 368
369 def _getDirectorySize(path): 369 def _getDirectorySize(path):
370 try: 370 try:
371 dirsize = 0 371 dirsize = 0
372 for root, dirs, files in os.walk(path): 372 for root, dirs, files in os.walk(path):
373 dirsize += sum(os.path.getsize(os.path.join(root, name)) for name in files) 373 dirsize += sum([os.path.getsize(os.path.join(root, name)) for name in files])
374 except EnvironmentError, e: 374 except EnvironmentError, e:
375 dirsize = -1 375 dirsize = -1
376 return dirsize 376 return dirsize
377 377
378 _ = self._ 378 _ = self._