Changeset d203fde in trunk
- Timestamp:
- 2019-02-27T00:06:35Z (6 years ago)
- Branches:
- master
- Children:
- 1b55a7f
- Parents:
- 25a6200
- Location:
- src/allmydata
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified src/allmydata/test/test_runner.py ¶
r25a6200 rd203fde 207 207 def test_escape_in_eliot_destination(self): 208 208 out, err, rc_or_sig = yield self.run_bintahoe([ 209 "--eliot-destination=file: \\foo",209 "--eliot-destination=file:@foo", 210 210 ]) 211 211 self.assertEqual(1, rc_or_sig) -
TabularUnified src/allmydata/util/eliotutil.py ¶
r25a6200 rd203fde 433 433 434 434 def _parse_file(self, kind, arg_text): 435 # Reserve the possibility of an escape character in the future. 436 if u"\\" in arg_text: 435 # Reserve the possibility of an escape character in the future. \ is 436 # the standard choice but it's the path separator on Windows which 437 # pretty much ruins it in this context. Most other symbols already 438 # have some shell-assigned meaning which makes them treacherous to use 439 # in a CLI interface. Eliminating all such dangerous symbols leaves 440 # approximately @. 441 if u"@" in arg_text: 437 442 raise ValueError( 438 u"Unsupported escape character ( \\) in destination text ({!r}).".format(arg_text),443 u"Unsupported escape character (@) in destination text ({!r}).".format(arg_text), 439 444 ) 440 445 arg_list = arg_text.split(u":")
Note: See TracChangeset
for help on using the changeset viewer.