- Notifications
You must be signed in to change notification settings - Fork36
RemoteOperations::exec_command explicitly transfers LANG, LANGUAGE and LC_* envvars to the server side#187
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Changes from1 commit
f5fe1662b1db894f0ba364eb8330f4dc062ee78bcd5564938File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
…ard]The following methods of RemoteOperations were corrected: - _make_exec_env_list - _does_put_envvar_into_exec_cmd - _quote_envvar
- Loading branch information
Uh oh!
There was an error while loading.Please reload this page.
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -515,6 +515,7 @@ def db_connect(self, dbname, user, password=None, host="localhost", port=5432): | ||
| ) | ||
| return conn | ||
| @staticmethod | ||
| def _make_exec_env_list() -> list[str]: | ||
Contributor There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. тут нужно self, либо добавить@staticmethod CollaboratorAuthor There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. self тут не нужен. Это статический метод. Хорошо, я добавлю этот декоратор. Я там в других местах тоже статические методы определял... Тогда я пока только в новом коде этого PR его добавлю, а потом, отдельным коммитом, добавим его во все остальные случаи. PS. Я этот питон на ходу изучаю, поэтому многие вещи использую неправильно )))) | ||
| result = list[str]() | ||
| for envvar in os.environ.items(): | ||
| @@ -529,6 +530,7 @@ def _make_exec_env_list() -> list[str]: | ||
| sm_envs_for_exec_cmd = ["LANG", "LANGUAGE"] | ||
| @staticmethod | ||
| def _does_put_envvar_into_exec_cmd(name: str) -> bool: | ||
Contributor There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. тут нужно self, либо добавить@staticmethod | ||
| assert type(name) == str # noqa: E721 | ||
| name = name.upper() | ||
| @@ -538,6 +540,7 @@ def _does_put_envvar_into_exec_cmd(name: str) -> bool: | ||
| return True | ||
| return False | ||
| @staticmethod | ||
| def _quote_envvar(value) -> str: | ||
| ||
| assert type(value) == str # noqa: E721 | ||
| result = "\"" | ||