fixing the compatibile problem of misc.get_distro
authorJF Ding <jian-feng.ding@intel.com>
Thu, 12 Jul 2012 09:18:27 +0000 (17:18 +0800)
committerJF Ding <jian-feng.ding@intel.com>
Thu, 12 Jul 2012 09:18:27 +0000 (17:18 +0800)
mic/utils/misc.py
tools/mic

index c607dbc..8951139 100644 (file)
@@ -74,6 +74,13 @@ def get_distro():
         (dist, ver, id) = platform.dist( \
                               supported_dists = support_dists)
 
+    return (dist, ver, id)
+
+def get_distro_str():
+    """Get composited string for current linux distribution
+    """
+    (dist, ver, id) = get_distro()
+
     if not dist:
         return 'Unknown Linux Distro'
     else:
index f55b061..48ba764 100755 (executable)
--- a/tools/mic
+++ b/tools/mic
@@ -204,7 +204,7 @@ class MicCmd(cmdln.Cmdln):
 
 if __name__ == "__main__":
     try:
-        msger.raw("mic %s (%s)" % (VERSION, misc.get_distro()))
+        msger.raw("mic %s (%s)" % (VERSION, misc.get_distro_str()))
         mic = MicCmd()
         sys.exit(mic.main())