Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(278)

Unified Diff: Tools/Scripts/webkitpy/common/system/filesystem_mock.py

Issue 493413002: Fix runtime error in copytree() MockFileSystem (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Tools/Scripts/webkitpy/common/system/filesystem_mock.py
diff --git a/Tools/Scripts/webkitpy/common/system/filesystem_mock.py b/Tools/Scripts/webkitpy/common/system/filesystem_mock.py
index 70dfff3fa64287e63b077decfda3cf5b49f3d7ee..d64eaa6c8deedfe3c14e54e1f682e6d32e8140b7 100644
--- a/Tools/Scripts/webkitpy/common/system/filesystem_mock.py
+++ b/Tools/Scripts/webkitpy/common/system/filesystem_mock.py
@@ -391,7 +391,9 @@ class MockFileSystem(object):
source = self.normpath(source)
destination = self.normpath(destination)
- for source_file in self.files:
+ #Have to make a copy because we are modifying the list within the loop
vivekg 2014/08/22 08:48:09 nit: space after '#'
patro 2014/08/22 09:28:28 Done.
+ file_list = self.files.keys()
+ for source_file in file_list:
vivekg 2014/08/22 08:48:09 or could be `for source_file in self.files.keys():
patro 2014/08/22 09:28:28 Done.
if source_file.startswith(source):
destination_path = self.join(destination, self.relpath(source_file, source))
self.maybe_make_directory(self.dirname(destination_path))
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698