diff --git a/installsystems/tools.py b/installsystems/tools.py index f54b11678df9c1913601b0ffa139ef9ef0c979ae..30b06d16be2980bb0c38ad8fd16c4035317f4a65 100644 --- a/installsystems/tools.py +++ b/installsystems/tools.py @@ -60,7 +60,7 @@ def copy(source, destination, uid=None, gid=None, mode=None, timeout=None): elif (stype == "http" or stype == "ftp") and dtype == "file": f_dest = open(destination, "w") f_source = urllib2.urlopen(source, timeout=timeout) - f_dest.write(f_source.read()) + copyfileobj(f_source, f_dest) elif stype == "file" and dtype == "": raise NotImplementedError else: