projects
/
ganeti-local
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
13998ef
)
utils.CalculateDirectorySize: Don't redefine builtin
author
Michael Hanselmann
<hansmi@google.com>
Wed, 2 Sep 2009 14:28:41 +0000
(16:28 +0200)
committer
Michael Hanselmann
<hansmi@google.com>
Thu, 3 Sep 2009 15:44:45 +0000
(17:44 +0200)
Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Luca Bigliardi <shammash@google.com>
lib/utils.py
patch
|
blob
|
history
diff --git
a/lib/utils.py
b/lib/utils.py
index
aff0a3e
..
5a23d70
100644
(file)
--- a/
lib/utils.py
+++ b/
lib/utils.py
@@
-1871,8
+1871,8
@@
def CalculateDirectorySize(path):
size = 0
for (curpath, _, files) in os.walk(path):
- for file in files:
- st = os.lstat(os.path.join(curpath, file))
+ for filename in files:
+ st = os.lstat(os.path.join(curpath, filename))
size += st.st_size
return BytesToMebibyte(size)