-
Notifications
You must be signed in to change notification settings - Fork 371
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
Conversation
…s; logging cleanup
|
||
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 |
There was a problem hiding this comment.
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``. |
There was a problem hiding this comment.
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)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hm..
There was a problem hiding this 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
hostname
whenhostnamectl
fails/cc @jinhyunr @brendandixon