mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-24 21:31:04 +00:00
Bug 1817815 - use double quotes for mach try presets, r=ahal
Differential Revision: https://phabricator.services.mozilla.com/D170364
This commit is contained in:
parent
c1d9c7e58c
commit
955b0ad251
@ -10,6 +10,16 @@ import subprocess
|
||||
import yaml
|
||||
|
||||
|
||||
# Ensure strings with ' like fzf query strings get double-quoted:
|
||||
def represent_str(self, data):
|
||||
if "'" in data:
|
||||
return self.represent_scalar("tag:yaml.org,2002:str", data, style='"')
|
||||
return self.represent_scalar("tag:yaml.org,2002:str", data)
|
||||
|
||||
|
||||
yaml.SafeDumper.add_representer(str, represent_str)
|
||||
|
||||
|
||||
class PresetHandler:
|
||||
def __init__(self, path):
|
||||
self.path = path
|
||||
|
Loading…
Reference in New Issue
Block a user