Comment 1 for bug 529869

Phil Veal (pmveal) wrote :

I just ran into this after upgrading from 0.6.06 to 0.6.07 -

duplicity --name BACKUP1 --full-if-older-than 1M --no-encryption --include-globbing-filelist filelist / file:///media/BACKUP1
Traceback (most recent call last):
  File "/usr/bin/duplicity", line 1236, in <module>
  File "/usr/bin/duplicity", line 1229, in with_tempdir
  File "/usr/bin/duplicity", line 1115, in main
    action = commandline.ProcessCommandLine(sys.argv[1:])
  File "/usr/lib/python2.6/dist-packages/duplicity/", line 876, in ProcessCommandLine
    args = parse_cmdline_options(cmdline_list)
  File "/usr/lib/python2.6/dist-packages/duplicity/", line 450, in parse_cmdline_options
    (options, args) = parser.parse_args()
  File "/usr/lib/python2.6/", line 1394, in parse_args
    stop = self._process_args(largs, rargs, values)
  File "/usr/lib/python2.6/", line 1434, in _process_args
    self._process_long_opt(rargs, values)
  File "/usr/lib/python2.6/", line 1509, in _process_long_opt
    option.process(opt, value, values, self)
  File "/usr/lib/python2.6/", line 782, in process
    value = self.convert_value(opt, value)
  File "/usr/lib/python2.6/", line 774, in convert_value
    return self.check_value(opt, value)
  File "/usr/lib/python2.6/", line 769, in check_value
    return checker(self, opt, value)
  File "/usr/lib/python2.6/dist-packages/duplicity/", line 110, in check_time
    return dup_time.genstrtotime(value)
  File "/usr/lib/python2.6/dist-packages/duplicity/", line 271, in genstrtotime
    return override_curtime - intstringtoseconds(timestr)
TypeError: unsupported operand type(s) for -: 'NoneType' and 'int'

In my case the workaround is to remove "-full-if-older-than 1M" and to specify a full or incremental backup explicitly.

I believe the problem is that in duplicity main(), commandline.ProcessCommandLine() is now called before dup_time.setcurtime(), so the curtime global is not set.