fix errors about class importing and file opening
authorHasan Wan <hasan.wan@intel.com>
Mon, 27 May 2013 08:29:01 +0000 (16:29 +0800)
committerHasan Wan <hasan.wan@intel.com>
Mon, 27 May 2013 09:38:34 +0000 (17:38 +0800)
Change-Id: I085820d9f9c0e04b501769907c943fe999e0a503
Signed-off-by: Hasan Wan <hasan.wan@intel.com>
common/repomaker.py

index 1769caf..c7f9a6e 100644 (file)
@@ -22,6 +22,7 @@ RepoMaker - creates download repos
 import os
 import shutil
 from hashlib import sha256
+from subprocess import check_output, CalledProcessError
 
 from common.builddata import BuildData, BuildDataError
 
@@ -232,7 +233,7 @@ class RepoMaker(object):
             # Create or update build.xml
             outf = os.path.join(self.outdir, 'build.xml')
             if os.path.exists(outf):
-                bdata.load(open(outf))
+                bdata.load(open(outf).read())
 
             bdata.add_target(target)
             bdata.save(outf)