mirror of https://github.com/borgbackup/borg.git
remote: Use single quotes
This commit is contained in:
parent
0da913f8ed
commit
d25e9aa4f0
|
@ -102,7 +102,7 @@ class RepositoryServer: # pragma: no cover
|
||||||
if self.repository is not None:
|
if self.repository is not None:
|
||||||
self.repository.close()
|
self.repository.close()
|
||||||
else:
|
else:
|
||||||
os.write(stderr_fd, "Borg {}: Got connection close before repository was opened.\n"
|
os.write(stderr_fd, 'Borg {}: Got connection close before repository was opened.\n'
|
||||||
.format(__version__).encode())
|
.format(__version__).encode())
|
||||||
return
|
return
|
||||||
unpacker.feed(data)
|
unpacker.feed(data)
|
||||||
|
@ -137,7 +137,7 @@ class RepositoryServer: # pragma: no cover
|
||||||
tb = '%s\n%s' % (traceback.format_exc(), sysinfo())
|
tb = '%s\n%s' % (traceback.format_exc(), sysinfo())
|
||||||
logging.error(msg)
|
logging.error(msg)
|
||||||
logging.log(tb_log_level, tb)
|
logging.log(tb_log_level, tb)
|
||||||
exc = "Remote Exception (see remote log for the traceback)"
|
exc = 'Remote Exception (see remote log for the traceback)'
|
||||||
os.write(stdout_fd, msgpack.packb((1, msgid, e.__class__.__name__, exc)))
|
os.write(stdout_fd, msgpack.packb((1, msgid, e.__class__.__name__, exc)))
|
||||||
else:
|
else:
|
||||||
os.write(stdout_fd, msgpack.packb((1, msgid, None, res)))
|
os.write(stdout_fd, msgpack.packb((1, msgid, None, res)))
|
||||||
|
@ -272,7 +272,7 @@ This TypeError is a cosmetic side effect of the compatibility code borg
|
||||||
clients >= 1.0.7 have to support older borg servers.
|
clients >= 1.0.7 have to support older borg servers.
|
||||||
This problem will go away as soon as the server has been upgraded to 1.0.7+.
|
This problem will go away as soon as the server has been upgraded to 1.0.7+.
|
||||||
"""
|
"""
|
||||||
# emit this msg in the same way as the "Remote: ..." lines that show the remote TypeError
|
# emit this msg in the same way as the 'Remote: ...' lines that show the remote TypeError
|
||||||
sys.stderr.write(msg)
|
sys.stderr.write(msg)
|
||||||
if append_only:
|
if append_only:
|
||||||
raise self.NoAppendOnlyOnServer()
|
raise self.NoAppendOnlyOnServer()
|
||||||
|
@ -283,10 +283,10 @@ This problem will go away as soon as the server has been upgraded to 1.0.7+.
|
||||||
|
|
||||||
def __del__(self):
|
def __del__(self):
|
||||||
if len(self.responses):
|
if len(self.responses):
|
||||||
logging.debug("still %d cached responses left in RemoteRepository" % (len(self.responses),))
|
logging.debug('still %d cached responses left in RemoteRepository' % (len(self.responses),))
|
||||||
if self.p:
|
if self.p:
|
||||||
self.close()
|
self.close()
|
||||||
assert False, "cleanup happened in Repository.__del__"
|
assert False, 'cleanup happened in Repository.__del__'
|
||||||
|
|
||||||
def __repr__(self):
|
def __repr__(self):
|
||||||
return '<%s %s>' % (self.__class__.__name__, self.location.canonical_path())
|
return '<%s %s>' % (self.__class__.__name__, self.location.canonical_path())
|
||||||
|
@ -310,7 +310,7 @@ This problem will go away as soon as the server has been upgraded to 1.0.7+.
|
||||||
|
|
||||||
def borg_cmd(self, args, testing):
|
def borg_cmd(self, args, testing):
|
||||||
"""return a borg serve command line"""
|
"""return a borg serve command line"""
|
||||||
# give some args/options to "borg serve" process as they were given to us
|
# give some args/options to 'borg serve' process as they were given to us
|
||||||
opts = []
|
opts = []
|
||||||
if args is not None:
|
if args is not None:
|
||||||
opts.append('--umask=%03o' % args.umask)
|
opts.append('--umask=%03o' % args.umask)
|
||||||
|
@ -430,7 +430,7 @@ This problem will go away as soon as the server has been upgraded to 1.0.7+.
|
||||||
while not self.to_send and (calls or self.preload_ids) and len(waiting_for) < MAX_INFLIGHT:
|
while not self.to_send and (calls or self.preload_ids) and len(waiting_for) < MAX_INFLIGHT:
|
||||||
if calls:
|
if calls:
|
||||||
if is_preloaded:
|
if is_preloaded:
|
||||||
assert cmd == "get", "is_preload is only supported for 'get'"
|
assert cmd == 'get', "is_preload is only supported for 'get'"
|
||||||
if calls[0][0] in self.chunkid_to_msgids:
|
if calls[0][0] in self.chunkid_to_msgids:
|
||||||
waiting_for.append(pop_preload_msgid(calls.pop(0)[0]))
|
waiting_for.append(pop_preload_msgid(calls.pop(0)[0]))
|
||||||
else:
|
else:
|
||||||
|
@ -531,7 +531,7 @@ def handle_remote_line(line):
|
||||||
logname, msg = msg.split(' ', 1)
|
logname, msg = msg.split(' ', 1)
|
||||||
logging.getLogger(logname).log(level, msg.rstrip())
|
logging.getLogger(logname).log(level, msg.rstrip())
|
||||||
else:
|
else:
|
||||||
sys.stderr.write("Remote: " + line)
|
sys.stderr.write('Remote: ' + line)
|
||||||
|
|
||||||
|
|
||||||
class RepositoryNoCache:
|
class RepositoryNoCache:
|
||||||
|
|
Loading…
Reference in New Issue