Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CentOS 7.0 hostnamectl fix #573

Merged
merged 2 commits into from
Jan 26, 2017
Merged

CentOS 7.0 hostnamectl fix #573

merged 2 commits into from
Jan 26, 2017

Conversation

hglkrijger
Copy link
Member

/cc @jinhyunr @brendandixon


See POSIX.1:2013 Vol 3, Chap 2, Sec 2.2.2:
http://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_02_02
http://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html
#tag_18_02_02
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hm..

@@ -93,15 +98,17 @@ def quote(word_list):
byte-literal single quote.

The resulting string is safe for use with ``shell=True`` in ``subprocess``,
and in ``os.system``. ``assert shlex.split(ShellQuote(wordList)) == wordList``.
and in ``os.system``. ``assert shlex.split(ShellQuote(wordList)) ==
wordList``.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hm..

return " ".join(list("'{0}'".format(s.replace("'", "'\\''")) for s in word_list))

return " ".join(
list("'{0}'".format(s.replace("'", "'\\''")) for s in word_list))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hm..

Copy link
Contributor

@jinhyunr jinhyunr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think auto-formatting massed up some lines.. other than that. LGTM

@hglkrijger hglkrijger merged commit d18d34c into Azure:master Jan 26, 2017
@hglkrijger hglkrijger deleted the hostnamectl branch January 26, 2017 01:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants