Skip to content

Commit

Permalink
reenable piping gocryptfs output as the bug is fixed in rfjakob/gocry…
Browse files Browse the repository at this point in the history
  • Loading branch information
Germar authored and daviewales committed Oct 18, 2024
1 parent bae2a0b commit 652c57f
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions common/gocryptfstools.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,16 +63,15 @@ def _mount(self):
%' '.join(gocryptfs),
self)

proc = subprocess.Popen(gocryptfs, env = env)
# if stdout/err are piped into python gocryptfs v1.4 stays in
# foreground instead of forking away. So we can't redirect output
# for error messages.
proc.communicate()
proc = subprocess.Popen(gocryptfs, env = env,
stdout = subprocess.PIPE,
stderr = subprocess.STDOUT,
universal_newlines = True)
output = proc.communicate()[0]
#### self.backupConfig()
if proc.returncode:
raise MountException(_('Can\'t mount \'%(command)s\':\n\n%(error)s') \
% {'command': ' '.join(gocryptfs),
'error': 'Take a look into syslog for error messages.'})
% {'command': ' '.join(gocryptfs), 'error': output})

def init(self):
"""
Expand Down

0 comments on commit 652c57f

Please sign in to comment.