Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/common/Util
diff options
context:
space:
mode:
authorAleksey Lim <alsroot@member.fsf.org>2008-12-19 01:30:32 (GMT)
committer Aleksey Lim <alsroot@member.fsf.org>2008-12-19 23:50:57 (GMT)
commitfbee8354739ecb45aa70345a7ee3a7b0584e6766 (patch)
tree309c019f24ba78fe3bd7e6e901aaaac05b041b81 /common/Util
parentdf75dd3b08c5ae87cc0c9d43870a5a73467eeb0f (diff)
use OS.system instead of commands.getstatusoutput
Diffstat (limited to 'common/Util')
-rw-r--r--common/Util/OS.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/common/Util/OS.py b/common/Util/OS.py
new file mode 100644
index 0000000..6bea80b
--- /dev/null
+++ b/common/Util/OS.py
@@ -0,0 +1,12 @@
+import commands
+import logging
+
+def system(*args):
+ cmd = ' '.join(args)
+ logging.debug('[system] %s' % cmd)
+
+ status = commands.getstatusoutput(cmd)
+ logging.debug('[system][out] %d: %s' % status)
+
+ return status
+