LibraryOfCongress / bagit-python

Work with BagIt packages from Python.
http://libraryofcongress.github.io/bagit-python
218 stars 85 forks source link

Perform proper whitespace substitution for multiple values per key #98

Closed fkloft closed 6 years ago

fkloft commented 6 years ago

Currently, if there are multiple values for a key in 'bag-info.txt,_make_tag_file()` will not perform newline substitution. This PR fixes that.

The change in line 105 is necessary if there are non-string values, like in the test case. Parameter expansion is used to work with both Python 2 and 3.

coveralls commented 6 years ago

Coverage Status

Coverage remained the same at 83.024% when pulling 7498ff3fec51976c10d08a4790c301c82eb99172 on fkloft:master into a471b8d797b104251b3be44be48296521ea8c10a on LibraryOfCongress:master.