mirror of
https://github.com/borgbackup/borg.git
synced 2025-03-15 16:40:23 +00:00
Fix a few minor coding style issues
This commit is contained in:
parent
d58784d738
commit
12786a8833
1 changed files with 4 additions and 3 deletions
|
@ -374,7 +374,7 @@ class Location(object):
|
||||||
items.append('user=%r' % self.user)
|
items.append('user=%r' % self.user)
|
||||||
items.append('host=%r' % self.host)
|
items.append('host=%r' % self.host)
|
||||||
items.append('port=%r' % self.port)
|
items.append('port=%r' % self.port)
|
||||||
items.append('path=%r'% self.path)
|
items.append('path=%r' % self.path)
|
||||||
items.append('archive=%r' % self.archive)
|
items.append('archive=%r' % self.archive)
|
||||||
return ', '.join(items)
|
return ', '.join(items)
|
||||||
|
|
||||||
|
@ -406,9 +406,10 @@ def read_msgpack(filename):
|
||||||
with open(filename, 'rb') as fd:
|
with open(filename, 'rb') as fd:
|
||||||
return msgpack.unpack(fd)
|
return msgpack.unpack(fd)
|
||||||
|
|
||||||
|
|
||||||
def write_msgpack(filename, d):
|
def write_msgpack(filename, d):
|
||||||
with open(filename+'.tmp', 'wb') as fd:
|
with open(filename + '.tmp', 'wb') as fd:
|
||||||
msgpack.pack(d, fd)
|
msgpack.pack(d, fd)
|
||||||
fd.flush()
|
fd.flush()
|
||||||
os.fsync(fd)
|
os.fsync(fd)
|
||||||
os.rename(filename+'.tmp', filename)
|
os.rename(filename + '.tmp', filename)
|
||||||
|
|
Loading…
Add table
Reference in a new issue