duplicity.gpg.gpg_failed() breaks and spews on GnuPG error
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Duplicity |
Fix Released
|
Medium
|
Unassigned |
Bug Description
It looks like r570 introduced a bug in how GnuPG error messages are reported back to the user. (At least it breaks in Python 2.5.1, which is what I'm using.)
It looks like the block beginning with "for line in self.logger_fp, self.stderr_fp:" is not working as expected. At some point the "line" variable ends up containing a file object. I *think* what's happening is that when logger_fp is done iterating, the next thing returned is stderr_fp--the object itself.
I am not a Python adept, so the best way I could figure to make it do what's intended is to split the block into twin blocks, one for logger_fp and one for stderr_fp. Seems like there ought to be a better way to do that. But it fixes the bug for me.
Here is an example of the bug output, and I will attach a merge bundle for my fix in a minute.
Traceback (most recent call last):
File "./duplicity-bin", line 1238, in <module>
with_
File "./duplicity-bin", line 1231, in with_tempdir
fn()
File "./duplicity-bin", line 1187, in main
verify(
File "./duplicity-bin", line 660, in verify
for backup_ropath, current_path in collated:
File "/home/
relem1 = riter1.next()
File "/home/
for patch_seq in collated:
File "/home/
for relem2 in riter2:
File "/home/
tarinfo_list = [tar_iter.next()]
File "/home/
self.
File "/home/
assert not self.current_
File "/home/
assert not self.fileobj.
File "/home/
self.
File "/home/
msg += line.strip() + "\n"
AttributeError: 'file' object has no attribute 'strip'
description: | updated |
Changed in duplicity: | |
importance: | Undecided → Medium |
status: | New → Fix Committed |
Changed in duplicity: | |
milestone: | none → 0.6.03 |
Changed in duplicity: | |
status: | Fix Committed → Fix Released |
I think I *did* find a better way!