/mandos/trunk

To get this branch, use:
bzr branch http://bzr.recompile.se/loggerhead/mandos/trunk

« back to all changes in this revision

Viewing changes to mandos

  • Committer: Teddy Hogeborn
  • Date: 2016-08-25 17:37:05 UTC
  • Revision ID: teddy@recompile.se-20160825173705-q2v6lban8ph9uw75
PEP8 compliance: mandos

* mandos: Add PEP8 compliance (as per the "pycodestyle" tool).

Show diffs side-by-side

added added

removed removed

Lines of Context:
114
114
if sys.version_info.major == 2:
115
115
    str = unicode
116
116
 
117
 
version = "1.7.13"
 
117
version = "1.7.10"
118
118
stored_state_file = "clients.pickle"
119
119
 
120
120
logger = logging.getLogger()
507
507
    """This isn't so much a class as it is a module-like namespace.
508
508
    It is instantiated once, and simulates having a GnuTLS module."""
509
509
 
510
 
    library = ctypes.util.find_library("gnutls")
511
 
    if library is None:
512
 
        library = ctypes.util.find_library("gnutls-deb0")
513
 
    _library = ctypes.cdll.LoadLibrary(library)
514
 
    del library
 
510
    _library = ctypes.cdll.LoadLibrary(
 
511
        ctypes.util.find_library("gnutls"))
515
512
    _need_version = b"3.3.0"
516
513
 
517
514
    def __init__(self):
518
 
        # Need to use "self" here, since this method is called before
519
 
        # the assignment to the "gnutls" global variable happens.
520
 
        if self.check_version(self._need_version) is None:
521
 
            raise self.Error("Needs GnuTLS {} or later"
522
 
                             .format(self._need_version))
 
515
        # Need to use class name "GnuTLS" here, since this method is
 
516
        # called before the assignment to the "gnutls" global variable
 
517
        # happens.
 
518
        if GnuTLS.check_version(self._need_version) is None:
 
519
            raise GnuTLS.Error("Needs GnuTLS {} or later"
 
520
                               .format(self._need_version))
523
521
 
524
522
    # Unless otherwise indicated, the constants and types below are
525
523
    # all from the gnutls/gnutls.h C header file.
1460
1458
                         exc_info=error)
1461
1459
        return xmlstring
1462
1460
 
1463
 
 
1464
1461
try:
1465
1462
    dbus.OBJECT_MANAGER_IFACE
1466
1463
except AttributeError: