Code regression caused by revision 1108

Bug #1671852 reported by David Coppit
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Duplicity
Fix Released
Medium
Unassigned

Bug Description

Revision 1108 modified util.py, changing this:

return uexc(msg)

to this:

return util.uexc(msg)

But the uexc() function isn't in a package. It causes the exception below. Just remove the "util." and it's fixed.

Traceback (most recent call last):
  File "/usr/bin/rdiffdir", line 250, in <module>
    main()
  File "/usr/bin/rdiffdir", line 237, in main
    patch(file_args[0], get_fileobj(file_args[1], "rb"))
  File "/usr/bin/rdiffdir", line 207, in patch
    patchdir.Patch(path.Path(dirname), deltafp)
  File "/usr/lib64/python2.7/site-packages/duplicity/patchdir.py", line 50, in Patch
    patch_diff_tarfile(base_path, diff_tarfile)
  File "/usr/lib64/python2.7/site-packages/duplicity/patchdir.py", line 83, in patch_diff_tarfile
    ITR(basis_path.index, basis_path, diff_ropath)
  File "/usr/lib64/python2.7/site-packages/duplicity/lazy.py", line 329, in __call__
    self.process_w_branch(index, self.root_branch, args)
  File "/usr/lib64/python2.7/site-packages/duplicity/lazy.py", line 302, in process_w_branch
    branch.start_process, args)
  File "/usr/lib64/python2.7/site-packages/duplicity/robust.py", line 38, in check_common_error
    return function(*args)
  File "/usr/lib64/python2.7/site-packages/duplicity/patchdir.py", line 265, in start_process
    self.fast_process(index, basis_path, diff_ropath)
  File "/usr/lib64/python2.7/site-packages/duplicity/patchdir.py", line 310, in fast_process
    basis_path.patch_with_attribs(diff_ropath)
  File "/usr/lib64/python2.7/site-packages/duplicity/path.py", line 660, in patch_with_attribs
    diff_ropath.copy_attribs(temp_path)
  File "/usr/lib64/python2.7/site-packages/duplicity/path.py", line 468, in copy_attribs
    util.maybe_ignore_errors(lambda: os.chown(other.name, self.stat.st_uid, self.stat.st_gid))
  File "/usr/lib64/python2.7/site-packages/duplicity/util.py", line 97, in maybe_ignore_errors
    % (e.__class__.__name__, util.uexc(e)))
NameError: global name 'util' is not defined

Revision history for this message
Kenneth Loafman (kenneth-loafman) wrote : Re: [Bug 1671852] [NEW] Code regression caused by revision 1108
Download full text (4.8 KiB)

The change was made in revision 1165 of duplicity. Rev 1108 did not change
util.py.

Fixing now. Will be out in 0.7.12 in a few days.

On Fri, Mar 10, 2017 at 9:31 AM, David Coppit <email address hidden> wrote:

> Public bug reported:
>
> Revision 1108 modified util.py, changing this:
>
> return uexc(msg)
>
> to this:
>
> return util.uexc(msg)
>
> But the uexc() function isn't in a package. It causes the exception
> below. Just remove the "util." and it's fixed.
>
> Traceback (most recent call last):
> File "/usr/bin/rdiffdir", line 250, in <module>
> main()
> File "/usr/bin/rdiffdir", line 237, in main
> patch(file_args[0], get_fileobj(file_args[1], "rb"))
> File "/usr/bin/rdiffdir", line 207, in patch
> patchdir.Patch(path.Path(dirname), deltafp)
> File "/usr/lib64/python2.7/site-packages/duplicity/patchdir.py", line
> 50, in Patch
> patch_diff_tarfile(base_path, diff_tarfile)
> File "/usr/lib64/python2.7/site-packages/duplicity/patchdir.py", line
> 83, in patch_diff_tarfile
> ITR(basis_path.index, basis_path, diff_ropath)
> File "/usr/lib64/python2.7/site-packages/duplicity/lazy.py", line 329,
> in __call__
> self.process_w_branch(index, self.root_branch, args)
> File "/usr/lib64/python2.7/site-packages/duplicity/lazy.py", line 302,
> in process_w_branch
> branch.start_process, args)
> File "/usr/lib64/python2.7/site-packages/duplicity/robust.py", line 38,
> in check_common_error
> return function(*args)
> File "/usr/lib64/python2.7/site-packages/duplicity/patchdir.py", line
> 265, in start_process
> self.fast_process(index, basis_path, diff_ropath)
> File "/usr/lib64/python2.7/site-packages/duplicity/patchdir.py", line
> 310, in fast_process
> basis_path.patch_with_attribs(diff_ropath)
> File "/usr/lib64/python2.7/site-packages/duplicity/path.py", line 660,
> in patch_with_attribs
> diff_ropath.copy_attribs(temp_path)
> File "/usr/lib64/python2.7/site-packages/duplicity/path.py", line 468,
> in copy_attribs
> util.maybe_ignore_errors(lambda: os.chown(other.name,
> self.stat.st_uid, self.stat.st_gid))
> File "/usr/lib64/python2.7/site-packages/duplicity/util.py", line 97,
> in maybe_ignore_errors
> % (e.__class__.__name__, util.uexc(e)))
> NameError: global name 'util' is not defined
>
> ** Affects: duplicity
> Importance: Undecided
> Status: New
>
> --
> You received this bug notification because you are subscribed to
> Duplicity.
> https://bugs.launchpad.net/bugs/1671852
>
> Title:
> Code regression caused by revision 1108
>
> Status in Duplicity:
> New
>
> Bug description:
> Revision 1108 modified util.py, changing this:
>
> return uexc(msg)
>
> to this:
>
> return util.uexc(msg)
>
> But the uexc() function isn't in a package. It causes the exception
> below. Just remove the "util." and it's fixed.
>
> Traceback (most recent call last):
> File "/usr/bin/rdiffdir", line 250, in <module>
> main()
> File "/usr/bin/rdiffdir", line 237, in main
> patch(file_args[0], get_fileobj(file_args[1], "rb"))
> File "/usr/bin/rdiffdir", line 207, in patch
> patchdir.Patch(path.Path(dirname), deltafp)
> File "/us...

Read more...

Changed in duplicity:
importance: Undecided → Medium
milestone: none → 0.7.12
status: New → Fix Committed
Changed in duplicity:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.