Skip to content
This repository was archived by the owner on Jun 15, 2025. It is now read-only.

Commit 1a918e1

Browse files
committed
Fix exception when synchronizing remotely
We are lacking the proper prefixing of the command to issue with the remote command when synchronizing remotely, potentially resulting in an exception being raised because of a None being used. This change fixes the problem by using Repository.command to correctly prefix the commands issues by the _findSubvolPath function.
1 parent 9e452a7 commit 1a918e1

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

btrfs-backup/src/deso/btrfs/repository.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# repository.py
22

33
#/***************************************************************************
4-
# * Copyright (C) 2015-2017 Daniel Mueller (deso@posteo.net) *
4+
# * Copyright (C) 2015-2017,2019 Daniel Mueller (deso@posteo.net) *
55
# * *
66
# * This program is free software: you can redistribute it and/or modify *
77
# * it under the terms of the GNU General Public License as published by *
@@ -212,11 +212,14 @@ def _findSubvolPath(directory, repository):
212212
try:
213213
# We start off by looking up the ID of the subvolume containing the
214214
# given directory.
215-
output, _ = execute(*rootId(directory), stdout=b"", stderr=repository.stderr)
215+
cmd = repository.command(rootId, directory)
216+
output, _ = execute(*cmd, stdout=b"", stderr=repository.stderr)
216217
id_ = int(output[:-1])
218+
217219
# One we have that ID we can look up the subvolume's path relative
218220
# to the btrfs root.
219-
output, _ = execute(*resolveId(id_, directory), stdout=b"", stderr=repository.stderr)
221+
cmd = repository.command(resolveId, id_, directory)
222+
output, _ = execute(*cmd, stdout=b"", stderr=repository.stderr)
220223
return output[:-1].decode("utf-8")
221224
except ProcessError:
222225
return None

0 commit comments

Comments
 (0)