]> xenbits.xensource.com Git - people/pauldu/xenvif.git/commitdiff
Fix kdfiles.py
authorPaul Durrant <paul.durrant@citrix.com>
Tue, 10 Jan 2017 11:15:09 +0000 (11:15 +0000)
committerPaul Durrant <paul.durrant@citrix.com>
Tue, 10 Jan 2017 11:15:09 +0000 (11:15 +0000)
Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
kdfiles.py

index 71bb406c2bbeef74a04ebe6a376f4b9bf563f336..35c43f193c1a619f6fe70006e8067342051f91e5 100755 (executable)
@@ -2,25 +2,14 @@
 
 import os, sys
 import subprocess
+import glob
 from pprint import pprint
 
-def callfnout(cmd):
-    print(cmd)
-
-    sub = subprocess.Popen(cmd, stdout=subprocess.PIPE)
-    output = sub.communicate()[0]
-    ret = sub.returncode
-
-    if ret != 0:
-        raise(Exception("Error %d in : %s" % (ret, cmd)))
-
-    return output.decode('utf-8')
-
 def regenerate_kdfiles(filename, arch, pkg, source):
        cwd = os.getcwd()
        file = open(filename, 'w')
        os.chdir(pkg + '/' + arch)
-       drivers = callfnout(['ls','*.sys']).split()
+       drivers = glob.glob('*.sys')
        pprint(drivers)
        for driver in drivers:
                file.write("map\n")