py3: rebar-fix

This commit is contained in:
looooo
2018-04-21 11:03:00 +02:00
committed by wmayer
parent 77895f959d
commit 7da2d6ebbc

View File

@@ -505,18 +505,18 @@ def strprocessOfCustomSpacing(span_string):
in specific syntax and return output in the form of list. For eg.
Input: "3@100+2@200+3@100"
Output: [100, 100, 100, 200, 200, 100, 100, 100]"""
import string
span_st = string.strip(span_string)
span_sp = string.split(span_st, '+')
# import string
span_st = span_string.strip()
span_sp = span_st.split('+')
index = 0
spacinglist = []
while index < len(span_sp):
# Find "@" recursively in span_sp array.
# If not found, append the index value to "spacinglist" array.
if string.find(span_sp[index],'@') == -1:
if span_sp[index].find('@') == -1:
spacinglist.append(float(span_sp[index]))
else:
in_sp = string.split(span_sp[index], '@')
in_sp = span_sp[index].split('@')
count = 0
while count < int(in_sp[0]):
spacinglist.append(float(in_sp[1]))