| Index: tools/grit/grit/format/resource_map.py
|
| diff --git a/tools/grit/grit/format/resource_map.py b/tools/grit/grit/format/resource_map.py
|
| index e48182cab1c2907731e51dbe25e410ec2c3a32c8..e5fdd16ef203764e912a454fccd48762ae4464ec 100755
|
| --- a/tools/grit/grit/format/resource_map.py
|
| +++ b/tools/grit/grit/format/resource_map.py
|
| @@ -16,9 +16,9 @@ from grit import util
|
| def GetFormatter(type):
|
| if type == 'resource_map_header':
|
| return _FormatHeader
|
| - elif type == 'resource_map_source':
|
| + if type == 'resource_map_source':
|
| return partial(_FormatSource, _GetItemName)
|
| - elif type == 'resource_file_map_source':
|
| + if type == 'resource_file_map_source':
|
| return partial(_FormatSource, _GetItemPath)
|
|
|
|
|
| @@ -37,9 +37,9 @@ def GetMapName(root):
|
| raise Exception('unable to find resource header filename')
|
| filename = os.path.splitext(os.path.split(rc_header_file)[1])[0]
|
| filename = filename[0].upper() + filename[1:]
|
| - while filename.find('_') != -1:
|
| + while True:
|
| pos = filename.find('_')
|
| - if pos >= len(filename):
|
| + if pos == -1 or pos >= len(filename):
|
| break
|
| filename = filename[:pos] + filename[pos + 1].upper() + filename[pos + 2:]
|
| return 'k' + filename
|
|
|