Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make merge_opt_params compatible with Python 3 #162

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Make merge_opt_params compatible with Python 3 #162

wants to merge 1 commit into from

Conversation

austinbutler
Copy link

In Python 3 iteritems does not exist, so I was getting an AttributeError.

The command used was s4cmd dsync --recursive --delete-removed --API-Metadata='{"Cache-Control": "max-age=31536000"}' build <my_bucket>

[Exception] 'dict' object has no attribute 'iteritems'
Exception in thread Thread-10:d(s)]
Traceback (most recent call last):
  File "/Users/abutler/.local/pipx/venvs/s4cmd/bin/s4cmd.py", line 520, in run
    self.__class__.__dict__[func_name](self, *args, **kargs)
  File "/Users/abutler/.local/pipx/venvs/s4cmd/bin/s4cmd.py", line 129, in wrapper
    ret = func(*args, **kargs)
  File "/Users/abutler/.local/pipx/venvs/s4cmd/bin/s4cmd.py", line 1336, in upload
    'privilege': self.get_file_privilege(source)})
  File "/Users/abutler/.local/pipx/venvs/s4cmd/bin/s4cmd.py", line 399, in wrapped_method
    merged_kargs = self.merge_opt_params(method, kargs)
  File "/Users/abutler/.local/pipx/venvs/s4cmd/bin/s4cmd.py", line 432, in merge_opt_params
    for k, v in getattr(self.opt, key).iteritems():
AttributeError: 'dict' object has no attribute 'iteritems'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant