Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Don't fail over empty or faulty lines #1570
+39
−4
Conversation
| - os_release_dict[key] = value.strip('"') | ||
| + entry = line.rstrip().split('=') | ||
| + if len(entry) == 2: | ||
| + os_release_dict[entry[0]] = entry[1].strip('"') |
kalikiana
Sep 26, 2017
Collaborator
Would you mind adding a unit test to snapcraft/tests/test_common.py with your failing os-release and one that doesn't have an empty line?
sergiusens
merged commit bf216fd
into
snapcore:master
Sep 26, 2017
1 check passed
continuous-integration/travis-ci/pr
The Travis CI build passed
Details
|
\o/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
aleixpol commentedSep 25, 2017
If we're not going to be able to unpack it, ignore the line.
This is what it looks like on Arch Linux. Note the empty line in the end:
./runtests.sh static?./runtests.sh unit? < some tests fail but they also failed before as well