Browse code

Fixing the deprecated library function

os.popen() is deprecated since version 2.6. Resolved with use of
subprocess module.

Change-Id: Ib6a91ee525e2e57d3901d2c0c1b2d1305bc4566f

Anandprakash Dnyaneshwar Tandale authored on 2015/06/29 18:34:30
Showing 1 changed files
... ...
@@ -23,6 +23,7 @@ import os
23 23
 import os.path
24 24
 import sys
25 25
 
26
+from subprocess import Popen
26 27
 
27 28
 def get_options():
28 29
     parser = argparse.ArgumentParser(
... ...
@@ -46,7 +47,7 @@ def _dump_cmd(cmd):
46 46
     print cmd
47 47
     print "-" * len(cmd)
48 48
     print
49
-    print os.popen(cmd).read()
49
+    subprocess.Popen(cmd, shell=True)
50 50
 
51 51
 
52 52
 def _header(name):