+ 1#============================================================================
+ 2#Name : gscm.py
+ 3#Part of : Helium
+ 4
+ 5#Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ 6#All rights reserved.
+ 7#This component and the accompanying materials are made available
+ 8#under the terms of the License "Eclipse Public License v1.0"
+ 9#which accompanies this distribution, and is available
+10#at the URL "http://www.eclipse.org/legal/epl-v10.html".
+11#
+12#Initial Contributors:
+13#Nokia Corporation - initial contribution.
+14#
+15#Contributors:
+16#
+17#Description:
+18#===============================================================================
+19
+20""" Wrapper module that get CCM info using GSCM framework. """
+21
+22
+23importlogging
+24importos
+25importsubprocess
+26
+27
+28# Uncomment this line to enable logging in this module, or configure logging elsewhere
+29#logging.basicConfig(level=logging.DEBUG)
+30_logger=logging.getLogger("gscm")
+31
+32
+
34""" Runs a command and returns the result data. """
+35process=subprocess.Popen(command,shell=True,stdout=subprocess.PIPE,stderr=subprocess.STDOUT)
+36output=process.stdout.read()
+37process.poll()
+38status=process.returncode
+39return(output,status)
+