Commits

Michał Górny  committed 8f1591b

Use shutil.copyfileobj() to copy file contents. This should be more memory-friendly.

  • Participants
  • Parent commits b58d44d

Comments (0)

Files changed (1)

File smart-live-rebuild.py

 
 PV = '0.1'
 
-import bz2, os, re, subprocess, sys, tempfile
+import bz2, os, re, shutil, subprocess, sys, tempfile
 import portage
 
 from optparse import OptionParser
 		f = Shared.envtmpf
 		f.seek(0, 0)
 		f.truncate(0)
+		shutil.copyfileobj(envf, f)
 		f.write(envf.read())
 		f.flush()