ponymail-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject incubator-ponymail git commit: Redundant close() calls
Date Wed, 23 Aug 2017 20:12:54 GMT
Repository: incubator-ponymail
Updated Branches:
  refs/heads/master 5715502cf -> 54e690a06


Redundant close() calls

Project: http://git-wip-us.apache.org/repos/asf/incubator-ponymail/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ponymail/commit/54e690a0
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ponymail/tree/54e690a0
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ponymail/diff/54e690a0

Branch: refs/heads/master
Commit: 54e690a06a2db37779b828fab7209918c1c75552
Parents: 5715502
Author: Sebb <sebb@apache.org>
Authored: Wed Aug 23 21:12:50 2017 +0100
Committer: Sebb <sebb@apache.org>
Committed: Wed Aug 23 21:12:50 2017 +0100

----------------------------------------------------------------------
 tools/feedwrapper.py | 2 --
 tools/install.py     | 1 -
 tools/setup.py       | 2 --
 3 files changed, 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ponymail/blob/54e690a0/tools/feedwrapper.py
----------------------------------------------------------------------
diff --git a/tools/feedwrapper.py b/tools/feedwrapper.py
index 18bc4ce..2c49f57 100755
--- a/tools/feedwrapper.py
+++ b/tools/feedwrapper.py
@@ -53,7 +53,6 @@ subscribe
                 with open("%s/wrapper.log" % path, "a") as f:
                     f.write("%s - %s: %s\n" % (msg.get('to'), msg.get('reply-to'), msg.get('subject')))
                     f.write("We've got a subscription request for %s. \n" % msg.get('reply-to'))
-                    f.close()
                 
                 smtpObj = smtplib.SMTP('localhost')
                 smtpObj.sendmail(sys.argv[1], [msg.get('reply-to')], """From: %s
@@ -71,5 +70,4 @@ Subject: %s
                     print(p.communicate(input=msg.as_string().encode('utf-8')))
                     p.stdin.close()
                     f.write("-----\n")
-                    f.close()
             
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-ponymail/blob/54e690a0/tools/install.py
----------------------------------------------------------------------
diff --git a/tools/install.py b/tools/install.py
index a35a1df..fdd6953 100755
--- a/tools/install.py
+++ b/tools/install.py
@@ -65,7 +65,6 @@ if dname == 'ubuntu' or dname == 'debian':
     LuaCodeCache    stat
     AcceptPathInfo  On
 </VirtualHost>""")
-        f.close()
     
     if dname == 'ubuntu' and dver == '14.04':
         print("Ubuntu 14.04 specific step; Compiling mod_lua")

http://git-wip-us.apache.org/repos/asf/incubator-ponymail/blob/54e690a0/tools/setup.py
----------------------------------------------------------------------
diff --git a/tools/setup.py b/tools/setup.py
index d670c4e..bf646fb 100755
--- a/tools/setup.py
+++ b/tools/setup.py
@@ -504,7 +504,6 @@ generator:              %s
 ###############################################################
             """ % (hostname, dbname, port, 
                    'wait:                  active shard count' if ES_MAJOR == 5 else 'write:
                consistency level (default quorum)', genname))
-    f.close()
 
 config_path = "../site/api/lib"
 config_file = "config.lua"
@@ -544,7 +543,6 @@ local config = {
 }
 return config
             """ % (hostname, port, dbname, mlserver, mldom, "true" if wce else "false"))
-    f.close()
     
 print("Copying sample JS config to config.js (if needed)...")
 if not os.path.exists("../site/js/config.js") and os.path.exists("../site/js/config.js.sample"):


Mime
View raw message