Spacing around operator.

This commit is contained in:
Mattias Põldaru 2012-07-04 23:08:04 +03:00
parent a33f39f50e
commit 5f04399d6c
1 changed files with 10 additions and 10 deletions

View File

@ -93,20 +93,20 @@ class SundayPlusImport(SongImport):
while i < len(data): while i < len(data):
# Data is held as #name: value pairs inside groups marked as []. # Data is held as #name: value pairs inside groups marked as [].
# Now we are looking for the name. # Now we are looking for the name.
if data[i:i+1] == '#': if data[i:i + 1] == '#':
name_end = data.find(':', i+1) name_end = data.find(':', i + 1)
name = data[i+1:name_end] name = data[i + 1:name_end]
i = name_end + 1 i = name_end + 1
while data[i:i+1] == ' ': while data[i:i + 1] == ' ':
i += 1 i += 1
if data[i:i+1] == '"': if data[i:i + 1] == '"':
end = data.find('"', i+1) end = data.find('"', i + 1)
value = data[i+1:end] value = data[i + 1:end]
elif data[i:i+1] == '[': elif data[i:i + 1] == '[':
j = i j = i
inside_quotes = False inside_quotes = False
while j < len(data): while j < len(data):
char = data[j:j+1] char = data[j:j + 1]
if char == '"': if char == '"':
inside_quotes = not inside_quotes inside_quotes = not inside_quotes
elif not inside_quotes and char == ']': elif not inside_quotes and char == ']':
@ -115,7 +115,7 @@ class SundayPlusImport(SongImport):
j += 1 j += 1
value = data[i:end] value = data[i:end]
else: else:
end = data.find(',', i+1) end = data.find(',', i + 1)
if data.find('(', i, end) != -1: if data.find('(', i, end) != -1:
end = data.find(')', i) + 1 end = data.find(')', i) + 1
value = data[i:end] value = data[i:end]