[sysadmin-bin] Revert "Fix ftpadmin chocking on files without a newline at the end"
- From: Andrea Veri <averi src gnome org>
- To: gnome-sysadmin gnome org,commits-list gnome org
- Subject: [sysadmin-bin] Revert "Fix ftpadmin chocking on files without a newline at the end"
- Date: Mon, 8 Apr 2019 22:09:55 +0000 (UTC)
commit 175e09a45e234272de1d8a6d42c513f01b68b588
Author: Andrea Veri <averi redhat com>
Date: Tue Apr 9 00:08:30 2019 +0200
Revert "Fix ftpadmin chocking on files without a newline at the end"
This reverts commit 1fe43bd14ec12a702e80be311f7e755219374281.
The read() method reads file char-by-char which definitely is a no-go
for files that are big enough to hang the ftpadmin process when reading
the NEWS or ChangeLog files from glusterfs.
ftpadmin | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/ftpadmin b/ftpadmin
index 8d11184..ec81c75 100755
--- a/ftpadmin
+++ b/ftpadmin
@@ -513,7 +513,7 @@ class TarInfo(BasicInfo):
size_files += info.size
if info.name in files:
- self.file[os.path.basename(info.name)] = t.extractfile(info).read()
+ self.file[os.path.basename(info.name)] = t.extractfile(info).readlines()
if file_count == 1:
if '/' in info.name.lstrip('/'):
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]