Reply-To: | | [log in to unmask][log in to unmask]> Date: Thu Jun 15 10:26:20 2017 +0100
Do not use readlines where a function may be called on a file of arbitrary size. Fixes #40
>---------------------------------------------------------------
53ca59bef68eb85f684e736738130e069e767958 iotbx/xds/xparm.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/iotbx/xds/xparm.py b/iotbx/xds/xparm.py index a4343d8b2..433962e23 100644 --- a/iotbx/xds/xparm.py +++ b/iotbx/xds/xparm.py @@ -37,9 +37,8 @@ class reader(object): with open(filename, 'r') as file_handle: tokens = [] version = 1 - lines = file_handle.readlines() - assert len(lines) - for count, line in enumerate(lines): + count = 0 + for count, [...][log in to unmask] |