/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-11-03 18:58:44 UTC
  • Revision ID: teddy@recompile.se-20191103185844-r5ghn595fdzefg4w
mandos-monitor: Formatting changes only

* mandos-monitor: Re-order imports and normally use double quotes
                  instead of single quotes for strings.

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.
91
91
 
92
92
if sys.version_info.major == 2:
93
93
    __metaclass__ = type
94
 
    str = unicode
95
94
 
96
95
# Show warnings by default
97
96
if not sys.warnoptions:
123
122
            # No value found
124
123
            SO_BINDTODEVICE = None
125
124
 
 
125
if sys.version_info.major == 2:
 
126
    str = unicode
 
127
 
126
128
if sys.version_info < (3, 2):
127
129
    configparser.Configparser = configparser.SafeConfigParser
128
130
 
1411
1413
                raise ValueError("Byte arrays not supported for non-"
1412
1414
                                 "'ay' signature {!r}"
1413
1415
                                 .format(prop._dbus_signature))
1414
 
            value = dbus.ByteArray(bytes(value))
 
1416
            value = dbus.ByteArray(b''.join(chr(byte)
 
1417
                                            for byte in value))
1415
1418
        prop(value)
1416
1419
 
1417
1420
    @dbus.service.method(dbus.PROPERTIES_IFACE,