size-stats: fix bug when parsing file names with comma
authorThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Tue, 9 Aug 2016 10:25:11 +0000 (12:25 +0200)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Tue, 9 Aug 2016 10:25:11 +0000 (12:25 +0200)
commit34b1bdeba40bf303dc8821421745d5b38a729984
tree2b0cd587789820390ed545e8c942ce93f6830202
parent466934bb5c35856df22ff0c56021c38ee372685c
size-stats: fix bug when parsing file names with comma

The size-stats script fails when the usb_modeswitch_data is enabled,
because this package installs files that contain commas in their
name. However, the size-stats script also uses comma as a separator for
its CSV files, causing a "ValueError: too many values to unpack" in:

  pkg, fpath = l.split(",")

Fix this by splitting only the two fields that need to be split.

The bug was reported by Matthias <porto.rio@gmx.net>, who also suggested
a fix.

Fixes bug #9136.

Reported-by: Matthias <porto.rio@gmx.net>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
support/scripts/size-stats