File tree Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -258,12 +258,13 @@ async def status(self, current_path):
258
258
line_iterable = iter (strip_and_split (my_output ))
259
259
for line in line_iterable :
260
260
from_path = line [3 :]
261
- if line [0 ]== 'R' :
262
- #If file was renamed then we need both this line
263
- #and the next line, then we want to move onto the subsequent
264
- #line. We can accomplish this by calling next on the iterable
265
- from_path = next (line_iterable )
266
- result .append ({"x" : line [0 ], "y" : line [1 ], "to" : line [3 :], "from" : from_path })
261
+ result .append ({
262
+ "x" : line [0 ],
263
+ "y" : line [1 ],
264
+ "to" : line [3 :],
265
+ # if file was renamed, next line contains original path
266
+ "from" : next (line_iterable ) if line [0 ]== 'R' else line [3 :]
267
+ })
267
268
268
269
return {"code" : code , "files" : result }
269
270
You can’t perform that action at this time.
0 commit comments