qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gmur...@apache.org
Subject qpid-dispatch git commit: DISPATCH-736 - Fix syntax error that was caused in RHEL 7
Date Wed, 05 Apr 2017 13:25:20 GMT
Repository: qpid-dispatch
Updated Branches:
  refs/heads/master 097000477 -> bb1b085bb


DISPATCH-736 - Fix syntax error that was caused in RHEL 7


Project: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/commit/bb1b085b
Tree: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/tree/bb1b085b
Diff: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/diff/bb1b085b

Branch: refs/heads/master
Commit: bb1b085bbe7b0d493dbdb25151cbbff2ce37c381
Parents: 0970004
Author: Ganesh Murthy <gmurthy@redhat.com>
Authored: Wed Apr 5 09:25:08 2017 -0400
Committer: Ganesh Murthy <gmurthy@redhat.com>
Committed: Wed Apr 5 09:25:08 2017 -0400

----------------------------------------------------------------------
 tests/system_tests_policy.py | 17 +++++++++--------
 1 file changed, 9 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/bb1b085b/tests/system_tests_policy.py
----------------------------------------------------------------------
diff --git a/tests/system_tests_policy.py b/tests/system_tests_policy.py
index f90a496..2ce3778 100644
--- a/tests/system_tests_policy.py
+++ b/tests/system_tests_policy.py
@@ -86,14 +86,15 @@ class LoadPolicyFromFolder(TestCase):
         replacements = {'{IPV6_LOOPBACK}':', ::1'}
         for f in os.listdir(policy_config_path):
             if f.endswith(".json.in"):
-                with open(policy_config_path + "/" + f) as infile, open(policy_config_path+"/"+f[:-3],
'w') as outfile:
-                    for line in infile:
-                        for src, target in replacements.iteritems():
-                            if ipv6_enabled:
-                                line = line.replace(src, target)
-                            else:
-                                line = line.replace(src, '')
-                        outfile.write(line)
+                with open(policy_config_path+"/"+f[:-3], 'w') as outfile:
+                    with open(policy_config_path + "/" + f) as infile:
+                        for line in infile:
+                            for src, target in replacements.iteritems():
+                                if ipv6_enabled:
+                                    line = line.replace(src, target)
+                                else:
+                                    line = line.replace(src, '')
+                            outfile.write(line)
 
         config = Qdrouterd.Config([
             ('router', {'mode': 'standalone', 'id': 'QDR.Policy'}),


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org


Mime
View raw message