boto backend uses Python 2.5 conditional

Bug #629984 reported by Adam P
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Duplicity
Fix Released
Medium
Unassigned

Bug Description

The README states that Python 2.3 is required for Duplicity, but /duplicity/backends/botobackend.py (lines 190 and 193 in curernt 0.7-series) uses the ternary conditional operator introduced in Python 2.5 (http://en.wikipedia.org/wiki/Ternary_operation#Python).

I can confirm that this causes "setup.py install" to fail with a syntax error when using Python 2.4.

Revision history for this message
Alex Samorukov (samm-os2) wrote :

Yes, its also a problem for 0.6.09 - it doesnt work with python 2.4 anymore:

Using archive dir: /root/.cache/duplicity/91d549f50523cde5803fc19af784e349123
Using backup name: 91d549f50523cde5803fc19af784e349123
Import of duplicity.backends.giobackend Failed: No module named gio
Import of duplicity.backends.tahoebackend Succeeded
Import of duplicity.backends.rsyncbackend Succeeded
Import of duplicity.backends.cloudfilesbackend Succeeded
Import of duplicity.backends.ftpbackend Succeeded
Import of duplicity.backends.imapbackend Succeeded
Import of duplicity.backends.hsibackend Succeeded
Import of duplicity.backends.localbackend Succeeded
Import of duplicity.backends.webdavbackend Succeeded
Import of duplicity.backends.sshbackend Succeeded
Import of duplicity.backends.botobackend Failed: invalid syntax (botobackend.py, line 190)
Using temporary directory /tmp/duplicity-8RuL4g-tempdir
User error detail: Traceback (most recent call last):
  File "/opt/duplicity/bin/duplicity", line 1239, in ?
    with_tempdir(main)
  File "/opt/duplicity/bin/duplicity", line 1232, in with_tempdir
    fn()
  File "/opt/duplicity/bin/duplicity", line 1118, in main
    action = commandline.ProcessCommandLine(sys.argv[1:])
  File "/opt/duplicity/lib/python2.4/site-packages/duplicity/commandline.py", line 903, in ProcessCommandLine
    globals.backend = backend.get_backend(args[0])
  File "/opt/duplicity/lib/python2.4/site-packages/duplicity/backend.py", line 151, in get_backend
    raise UnsupportedBackendScheme(url_string)
UnsupportedBackendScheme: scheme not supported in url: s3+http://test-test-test

Revision history for this message
Alex Samorukov (samm-os2) wrote :

Patch for python 2.4 for the boto backend

Revision history for this message
Kenneth Loafman (kenneth-loafman) wrote :

This patch has already been applied and committed. Bringing ticket up-to-date.

Changed in duplicity:
importance: Undecided → Medium
milestone: none → 0.6.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.