[sysadmin-bin] Move the close file operation out of the loop



commit 6da67894217a903f538eede0bb01905721db0b52
Author: Andrea Veri <av gnome org>
Date:   Mon May 19 17:45:07 2014 +0200

    Move the close file operation out of the loop

 membership/foundation-db-operations.py |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/membership/foundation-db-operations.py b/membership/foundation-db-operations.py
index ddbfa9a..fff7a14 100755
--- a/membership/foundation-db-operations.py
+++ b/membership/foundation-db-operations.py
@@ -234,7 +234,8 @@ def subscribe_new_members():
 
         for row in new_members:
             f.write (str(row[0]) + "\n")
-            f.close()
+
+    f.close()
 
     if os.path.getsize('/tmp/new_subscribers') == 0:
         os.remove('/tmp/new_subscribers')


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]