Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
Diffstat (limited to 'common')
-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
+