MCPcopy Create free account
hub / github.com/pgadmin-org/pgadmin4 / escape_dquotes_process_arg

Function escape_dquotes_process_arg

web/pgadmin/misc/bgprocess/__init__.py:150–162  ·  view source on GitHub ↗
(arg)

Source from the content-addressed store, hash-verified

148
149
150def escape_dquotes_process_arg(arg):
151 # Double quotes has special meaning for shell command line and they are
152 # run without the double quotes. Add extra quotes to save our double
153 # quotes from stripping.
154
155 # This cannot be at common place as this file executes
156 # separately from pgadmin
157 dq_id = "#DQ#"
158
159 if arg.startswith('"') and arg.endswith('"'):
160 return r'{0}{1}{0}'.format(dq_id, arg)
161 else:
162 return arg

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected