Chromium Code Reviews| Index: pylib/gyp/generator/msvs.py |
| diff --git a/pylib/gyp/generator/msvs.py b/pylib/gyp/generator/msvs.py |
| index f9bfcec1767b837ee1f7b424e2f437643c2a9530..26badca126ba4a44fd6d81a0c2bd5b12f05ee663 100644 |
| --- a/pylib/gyp/generator/msvs.py |
| +++ b/pylib/gyp/generator/msvs.py |
| @@ -22,6 +22,15 @@ import gyp.MSVSUtil as MSVSUtil |
| import gyp.MSVSVersion as MSVSVersion |
| from gyp.common import GypError |
| +def _import_OrderedDict(): |
| + import collections |
| + try: |
| + return collections.OrderedDict |
| + except AttributeError: |
| + import ordered_dict |
| + return ordered_dict.OrderedDict |
| +OrderedDict = _import_OrderedDict() |
|
Nico
2013/12/13 17:54:18
# TODO: Remove once bots are on 2.7, http://crbug.
scottmg
2013/12/13 17:56:29
Done.
|
| + |
| # Regular expression for validating Visual Studio GUIDs. If the GUID |
| # contains lowercase hex letters, MSVS will be fine. However, |
| @@ -220,7 +229,7 @@ def _ConvertSourcesToFilterHierarchy(sources, prefix=None, excluded=None, |
| if not prefix: prefix = [] |
| result = [] |
| excluded_result = [] |
| - folders = collections.OrderedDict() |
| + folders = OrderedDict() |
| # Gather files into the final result, excluded, or folders. |
| for s in sources: |
| if len(s) == 1: |