get_bucket unknown keyword location and my_location name error

Bug #1569523 reported by Felix Bünemann
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Duplicity
Fix Released
Medium
Unassigned

Bug Description

There are two bugs in duplicity/backends/_boto_single.py of duplicity 0.7.07+bzr1206:

1) my_location is used instead of self.my_location causing:

NameError: global name 'my_location' is not defined

2) An unknown keyword argument location is passed to get_bucker (copy paste error from create_bucket)

See: https://github.com/boto/boto/blob/2.39.0/boto/s3/connection.py#L465

The attached patch fixes both problems.

Versions:
duplicity 0.7.07+bzr1206
Python 2.7.6
Ubuntu 14.04.4 LTS
boto 2.39.0
bucket in eu-central-1 location (requires AWS4 auth)

Backtrace of my_location name error:

Traceback (most recent call last):
  File "/usr/bin/duplicity", line 1537, in <module>
    with_tempdir(main)
  File "/usr/bin/duplicity", line 1531, in with_tempdir
    fn()
  File "/usr/bin/duplicity", line 1369, in main
    action = commandline.ProcessCommandLine(sys.argv[1:])
  File "/usr/lib/python2.7/dist-packages/duplicity/commandline.py", line 1117, in ProcessCommandLine
    backup, local_pathname = set_backend(args[0], args[1])
  File "/usr/lib/python2.7/dist-packages/duplicity/commandline.py", line 1006, in set_backend
    globals.backend = backend.get_backend(bend)
  File "/usr/lib/python2.7/dist-packages/duplicity/backend.py", line 223, in get_backend
    obj = get_backend_object(url_string)
  File "/usr/lib/python2.7/dist-packages/duplicity/backend.py", line 209, in get_backend_object
    return factory(pu)
  File "/usr/lib/python2.7/dist-packages/duplicity/backends/_boto_single.py", line 166, in __init__
    self.resetConnection()
  File "/usr/lib/python2.7/dist-packages/duplicity/backends/_boto_single.py", line 194, in resetConnection
    location=my_location)
NameError: global name 'my_location' is not defined

The unknown keyword error is in roughly the same location, so backtrace omitted.

Revision history for this message
Felix Bünemann (felix-buenemann) wrote :
Changed in duplicity:
status: New → Fix Released
milestone: none → 0.7.08
importance: Undecided → Medium
Revision history for this message
Felix Bünemann (felix-buenemann) wrote :

Thanks Kenneth, working fine in duplicity 0.7.07+bzr1207.

Changed in duplicity:
milestone: 0.7.08 → 0.7.07.1
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.