~ubuntu-branches/ubuntu/saucy/fail2ban/saucy

« back to all changes in this revision

Viewing changes to common/helpers.py

  • Committer: Package Import Robot
  • Author(s): Yaroslav Halchenko
  • Date: 2013-05-13 11:58:56 UTC
  • mfrom: (1.1.15) (10.2.13 sid)
  • Revision ID: package-import@ubuntu.com-20130513115856-x7six9p53qcie0vl
Tags: 0.8.9-1
* New upstream release
  - significant improvements in documentation (Closes: #400416)
  - roundcube auth filter (Closes: #699442)
  - enforces C locale for dates (Closes: #686341)
  - provides bash_completion.d/fail2ban
* debian/jail.conf:
  - added findtime and documentation on those basic options from jail.conf
    (Closes: #704568)
  - added new sample jails definitions for ssh-route, ssh-iptables-ipset{4,6},
    roundcube-auth, sogo-auth, mysqld-auth
* debian/control:
  - suggest system-log-daemon (Closes: #691001)
  - boost policy compliance to 3.9.4
* debian/rules:
  - run fail2ban's unittests at build time but ignore the failures
    (there are still some known issues to fix up to guarantee robust testing
    in clean chroots etc).
    Only pyinotify was added to build-depends since gamin might still be
    buggy on older releases and get stuck, which would complicate
    backporting

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
# along with Fail2Ban; if not, write to the Free Software
18
18
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
19
19
 
20
 
# Author: Cyril Jaquier
21
 
# Author: Arturo 'Buanzo' Busleiman
22
 
23
 
# $Revision$
24
 
 
25
 
__author__ = "Cyril Jaquier"
26
 
__version__ = "$Revision$"
27
 
__date__ = "$Date$"
 
20
__author__ = "Cyril Jaquier, Arturo 'Buanzo' Busleiman"
28
21
__copyright__ = "Copyright (c) 2009 Cyril Jaquier"
29
22
__license__ = "GPL"
30
23
 
36
29
        excName = cla.__name__
37
30
        try:
38
31
                excArgs = exc.__dict__["args"]
 
32
                # Assure that we always return a string, without unneeded
 
33
                # 'decorations' with python <= 2.5 where args would be a tuple
 
34
                if isinstance(excArgs, tuple) and len(excArgs) == 1:
 
35
                        excArgs = excArgs[0]
 
36
                excArgs = str(excArgs)
39
37
        except KeyError:
 
38
                # And always provide a string output
40
39
                excArgs = str(exc)
41
40
        return (excName, excArgs)