/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: 2019-09-01 04:27:59 UTC
  • Revision ID: teddy@recompile.se-20190901042759-dgadz8cg7x9y83ci
Fix minor Python 3 bytes/str mixups

* mandos (PGPEngine.__init__): Use byte string literals, not strings,
                               when working with byte strings.
  (main): When restoring persistent state from a file created by
          Python 2, also convert the "checker_command" setting from a
          byte string to a string, the same as "name" and "host".

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#!/usr/bin/python3 -bI
 
1
#!/usr/bin/python3 -b
2
2
# -*- mode: python; after-save-hook: (lambda () (let ((command (if (fboundp 'file-local-name) (file-local-name (buffer-file-name)) (or (file-remote-p (buffer-file-name) 'localname) (buffer-file-name))))) (if (= (progn (if (get-buffer "*Test*") (kill-buffer "*Test*")) (process-file-shell-command (format "%s --check" (shell-quote-argument command)) nil "*Test*")) 0) (let ((w (get-buffer-window "*Test*"))) (if w (delete-window w))) (progn (with-current-buffer "*Test*" (compilation-mode)) (display-buffer "*Test*" '(display-buffer-in-side-window)))))); coding: utf-8 -*-
3
3
#
4
4
# Mandos server - give out binary blobs to connecting clients.
128
128
if sys.version_info < (3, 2):
129
129
    configparser.Configparser = configparser.SafeConfigParser
130
130
 
131
 
version = "1.8.9"
 
131
version = "1.8.8"
132
132
stored_state_file = "clients.pickle"
133
133
 
134
134
logger = logging.getLogger()
1053
1053
        # Read return code from connection (see call_pipe)
1054
1054
        returncode = connection.recv()
1055
1055
        connection.close()
1056
 
        if self.checker is not None:
1057
 
            self.checker.join()
 
1056
        self.checker.join()
1058
1057
        self.checker_callback_tag = None
1059
1058
        self.checker = None
1060
1059