From c9dd163852c8d35e43460b665ed90070239053f5 Mon Sep 17 00:00:00 2001 From: Yaroslav Halchenko Date: Wed, 8 May 2013 13:46:06 -0400 Subject: [PATCH 1/3] Add README.Solaris into distribution --- MANIFEST | 1 + 1 file changed, 1 insertion(+) diff --git a/MANIFEST b/MANIFEST index b7ac5f33..0537abae 100644 --- a/MANIFEST +++ b/MANIFEST @@ -1,4 +1,5 @@ README.md +README.Solaris ChangeLog TODO THANKS From 582d1c5ea51e6850350b7c2677f23af7d84ccb80 Mon Sep 17 00:00:00 2001 From: Yaroslav Halchenko Date: Wed, 8 May 2013 13:59:09 -0400 Subject: [PATCH 2/3] ENH: remove use of $Revision and $Date SVN tags --- client/__init__.py | 2 -- client/actionreader.py | 2 -- client/configparserinc.py | 2 -- client/configreader.py | 2 -- client/configurator.py | 2 -- client/csocket.py | 2 -- client/fail2banreader.py | 2 -- client/filterreader.py | 2 -- client/jailreader.py | 2 -- client/jailsreader.py | 2 -- common/__init__.py | 2 -- common/helpers.py | 2 -- common/protocol.py | 2 -- testcases/__init__.py | 2 -- testcases/actiontestcase.py | 2 -- testcases/banmanagertestcase.py | 2 -- testcases/datedetectortestcase.py | 2 -- testcases/failmanagertestcase.py | 2 -- testcases/servertestcase.py | 2 -- testcases/sockettestcase.py | 2 -- 20 files changed, 40 deletions(-) diff --git a/client/__init__.py b/client/__init__.py index 3de9058c..2b76f4b6 100644 --- a/client/__init__.py +++ b/client/__init__.py @@ -21,7 +21,5 @@ # __author__ = "Cyril Jaquier" -__version__ = "$Revision$" -__date__ = "$Date$" __copyright__ = "Copyright (c) 2004 Cyril Jaquier" __license__ = "GPL" diff --git a/client/actionreader.py b/client/actionreader.py index c1a64245..8f60b55b 100644 --- a/client/actionreader.py +++ b/client/actionreader.py @@ -21,8 +21,6 @@ # __author__ = "Cyril Jaquier" -__version__ = "$Revision$" -__date__ = "$Date$" __copyright__ = "Copyright (c) 2004 Cyril Jaquier" __license__ = "GPL" diff --git a/client/configparserinc.py b/client/configparserinc.py index df5af1ac..f5e124a1 100644 --- a/client/configparserinc.py +++ b/client/configparserinc.py @@ -21,8 +21,6 @@ # Modified: Cyril Jaquier __author__ = 'Yaroslav Halhenko' -__revision__ = '$Revision$' -__date__ = '$Date$' __copyright__ = 'Copyright (c) 2007 Yaroslav Halchenko' __license__ = 'GPL' diff --git a/client/configreader.py b/client/configreader.py index 9fb6b3eb..3d3aff94 100644 --- a/client/configreader.py +++ b/client/configreader.py @@ -21,8 +21,6 @@ # Modified by: Yaroslav Halchenko (SafeConfigParserWithIncludes) __author__ = "Cyril Jaquier" -__version__ = "$Revision$" -__date__ = "$Date$" __copyright__ = "Copyright (c) 2004 Cyril Jaquier" __license__ = "GPL" diff --git a/client/configurator.py b/client/configurator.py index fc588558..d5f46305 100644 --- a/client/configurator.py +++ b/client/configurator.py @@ -21,8 +21,6 @@ # __author__ = "Cyril Jaquier" -__version__ = "$Revision$" -__date__ = "$Date$" __copyright__ = "Copyright (c) 2004 Cyril Jaquier" __license__ = "GPL" diff --git a/client/csocket.py b/client/csocket.py index c6f318f2..3d8362b5 100644 --- a/client/csocket.py +++ b/client/csocket.py @@ -21,8 +21,6 @@ # __author__ = "Cyril Jaquier" -__version__ = "$Revision$" -__date__ = "$Date$" __copyright__ = "Copyright (c) 2004 Cyril Jaquier" __license__ = "GPL" diff --git a/client/fail2banreader.py b/client/fail2banreader.py index 026076fa..ada88084 100644 --- a/client/fail2banreader.py +++ b/client/fail2banreader.py @@ -21,8 +21,6 @@ # __author__ = "Cyril Jaquier" -__version__ = "$Revision$" -__date__ = "$Date$" __copyright__ = "Copyright (c) 2004 Cyril Jaquier" __license__ = "GPL" diff --git a/client/filterreader.py b/client/filterreader.py index b8c47558..f75190f9 100644 --- a/client/filterreader.py +++ b/client/filterreader.py @@ -21,8 +21,6 @@ # __author__ = "Cyril Jaquier" -__version__ = "$Revision$" -__date__ = "$Date$" __copyright__ = "Copyright (c) 2004 Cyril Jaquier" __license__ = "GPL" diff --git a/client/jailreader.py b/client/jailreader.py index d6f678ee..f8757e26 100644 --- a/client/jailreader.py +++ b/client/jailreader.py @@ -21,8 +21,6 @@ # __author__ = "Cyril Jaquier" -__version__ = "$Revision$" -__date__ = "$Date$" __copyright__ = "Copyright (c) 2004 Cyril Jaquier" __license__ = "GPL" diff --git a/client/jailsreader.py b/client/jailsreader.py index f87794dd..098b525d 100644 --- a/client/jailsreader.py +++ b/client/jailsreader.py @@ -21,8 +21,6 @@ # __author__ = "Cyril Jaquier" -__version__ = "$Revision$" -__date__ = "$Date$" __copyright__ = "Copyright (c) 2004 Cyril Jaquier" __license__ = "GPL" diff --git a/common/__init__.py b/common/__init__.py index 3de9058c..2b76f4b6 100644 --- a/common/__init__.py +++ b/common/__init__.py @@ -21,7 +21,5 @@ # __author__ = "Cyril Jaquier" -__version__ = "$Revision$" -__date__ = "$Date$" __copyright__ = "Copyright (c) 2004 Cyril Jaquier" __license__ = "GPL" diff --git a/common/helpers.py b/common/helpers.py index 3c830138..dba4c9d6 100644 --- a/common/helpers.py +++ b/common/helpers.py @@ -22,8 +22,6 @@ # __author__ = "Cyril Jaquier" -__version__ = "$Revision$" -__date__ = "$Date$" __copyright__ = "Copyright (c) 2009 Cyril Jaquier" __license__ = "GPL" diff --git a/common/protocol.py b/common/protocol.py index ccd44398..9309ce7f 100644 --- a/common/protocol.py +++ b/common/protocol.py @@ -21,8 +21,6 @@ # __author__ = "Cyril Jaquier" -__version__ = "$Revision$" -__date__ = "$Date$" __copyright__ = "Copyright (c) 2004 Cyril Jaquier" __license__ = "GPL" diff --git a/testcases/__init__.py b/testcases/__init__.py index 3de9058c..2b76f4b6 100644 --- a/testcases/__init__.py +++ b/testcases/__init__.py @@ -21,7 +21,5 @@ # __author__ = "Cyril Jaquier" -__version__ = "$Revision$" -__date__ = "$Date$" __copyright__ = "Copyright (c) 2004 Cyril Jaquier" __license__ = "GPL" diff --git a/testcases/actiontestcase.py b/testcases/actiontestcase.py index e8a03abf..9a7776ac 100644 --- a/testcases/actiontestcase.py +++ b/testcases/actiontestcase.py @@ -21,8 +21,6 @@ # __author__ = "Cyril Jaquier" -__version__ = "$Revision$" -__date__ = "$Date$" __copyright__ = "Copyright (c) 2004 Cyril Jaquier" __license__ = "GPL" diff --git a/testcases/banmanagertestcase.py b/testcases/banmanagertestcase.py index 58651573..1e585244 100644 --- a/testcases/banmanagertestcase.py +++ b/testcases/banmanagertestcase.py @@ -21,8 +21,6 @@ # __author__ = "Cyril Jaquier" -__version__ = "$Revision$" -__date__ = "$Date$" __copyright__ = "Copyright (c) 2004 Cyril Jaquier" __license__ = "GPL" diff --git a/testcases/datedetectortestcase.py b/testcases/datedetectortestcase.py index 4b38fb12..8a838700 100644 --- a/testcases/datedetectortestcase.py +++ b/testcases/datedetectortestcase.py @@ -21,8 +21,6 @@ # __author__ = "Cyril Jaquier" -__version__ = "$Revision$" -__date__ = "$Date$" __copyright__ = "Copyright (c) 2004 Cyril Jaquier" __license__ = "GPL" diff --git a/testcases/failmanagertestcase.py b/testcases/failmanagertestcase.py index de23219c..1bfab339 100644 --- a/testcases/failmanagertestcase.py +++ b/testcases/failmanagertestcase.py @@ -21,8 +21,6 @@ # __author__ = "Cyril Jaquier" -__version__ = "$Revision$" -__date__ = "$Date$" __copyright__ = "Copyright (c) 2004 Cyril Jaquier" __license__ = "GPL" diff --git a/testcases/servertestcase.py b/testcases/servertestcase.py index 9a285553..ff3f2e88 100644 --- a/testcases/servertestcase.py +++ b/testcases/servertestcase.py @@ -21,8 +21,6 @@ # __author__ = "Cyril Jaquier" -__version__ = "$Revision$" -__date__ = "$Date$" __copyright__ = "Copyright (c) 2004 Cyril Jaquier" __license__ = "GPL" diff --git a/testcases/sockettestcase.py b/testcases/sockettestcase.py index cd13c772..d70c45cf 100644 --- a/testcases/sockettestcase.py +++ b/testcases/sockettestcase.py @@ -21,8 +21,6 @@ # __author__ = "Steven Hiscocks" -__version__ = "$Revision$" -__date__ = "$Date$" __copyright__ = "Copyright (c) 2013 Steven Hiscocks" __license__ = "GPL" From 28794d842dc8d737f7fb17ad5bbc91297f0aba0f Mon Sep 17 00:00:00 2001 From: Yaroslav Halchenko Date: Wed, 8 May 2013 15:14:28 -0400 Subject: [PATCH 3/3] ENH: close files in _test_move_into_file --- testcases/filtertestcase.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/testcases/filtertestcase.py b/testcases/filtertestcase.py index 00946f90..6cfa53a7 100644 --- a/testcases/filtertestcase.py +++ b/testcases/filtertestcase.py @@ -477,8 +477,8 @@ def get_monitor_failures_testcase(Filter_): def _test_move_into_file(self, interim_kill=False): # if we move a new file into the location of an old (monitored) file - self.file1 = _copy_lines_between_files(GetFailures.FILENAME_01, self.name, - n=100) + _copy_lines_between_files(GetFailures.FILENAME_01, self.name, + n=100).close() # make sure that it is monitored first self.assert_correct_last_attempt(GetFailures.FAILURES_01) self.assertEqual(self.filter.failManager.getFailTotal(), 3) @@ -488,14 +488,15 @@ def get_monitor_failures_testcase(Filter_): time.sleep(0.2) # let them know # now create a new one to override old one - self.file = _copy_lines_between_files(GetFailures.FILENAME_01, - self.name + '.new', n=100) + _copy_lines_between_files(GetFailures.FILENAME_01, self.name + '.new', + n=100).close() os.rename(self.name + '.new', self.name) self.assert_correct_last_attempt(GetFailures.FAILURES_01) self.assertEqual(self.filter.failManager.getFailTotal(), 6) # and to make sure that it now monitored for changes - _copy_lines_between_files(GetFailures.FILENAME_01, self.name, n=100) + _copy_lines_between_files(GetFailures.FILENAME_01, self.name, + n=100).close() self.assert_correct_last_attempt(GetFailures.FAILURES_01) self.assertEqual(self.filter.failManager.getFailTotal(), 9)