[gnome-shell] extension-tool: Use socket.gethostname() instead of an external process
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] extension-tool: Use socket.gethostname() instead of an external process
- Date: Wed, 13 Jul 2011 19:04:02 +0000 (UTC)
commit c8d5e0a51c2a7416425ea7ab07c55ae8aad525fc
Author: Jasper St. Pierre <jstpierre mecheye net>
Date: Wed Jun 22 21:29:20 2011 -0400
extension-tool: Use socket.gethostname() instead of an external process
Minor code cleanup.
https://bugzilla.gnome.org/show_bug.cgi?id=653206
src/gnome-shell-extension-tool.in | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/src/gnome-shell-extension-tool.in b/src/gnome-shell-extension-tool.in
index 578fe2d..0dcbf9b 100644
--- a/src/gnome-shell-extension-tool.in
+++ b/src/gnome-shell-extension-tool.in
@@ -3,6 +3,7 @@
import os
import re
+import socket
import subprocess
import sys
import optparse
@@ -41,7 +42,7 @@ Examples are: "Make windows visible on click", "Block advertisement popups"
underifier = re.compile('[^A-Za-z]')
sample_uuid = underifier.sub('_', name)
# TODO use evolution data server
- hostname = subprocess.Popen(['hostname'], stdout=subprocess.PIPE).communicate()[0].strip()
+ hostname = socket.gethostname()
sample_uuid = sample_uuid + '@' + hostname
print
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]