← Back to team overview

duplicity-team team mailing list archive

Re: [Question #192331]: TypeError in dup_time.py with remove-older-than

 

Question #192331 on Duplicity changed:
https://answers.launchpad.net/duplicity/+question/192331

Derek Kozikowski posted a new comment:
Digging into the source, at the problem:
  File "/usr/lib/python2.6/dist-packages/duplicity/dup_time.py", line 278, in genstrtotime
    return override_curtime - intstringtoseconds(timestr)

I imported the function with the problem and reproduced it by doing
this:

>>> None - intstringtoseconds('365D')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: unsupported operand type(s) for -: 'NoneType' and 'int'
>>> 

So, override_curtime is probably 'None'.  It's set to curtime earlier in the method, but that's a global initially set to 'None'.  
I don't see the function dup_time.genstrtotime(), actually setting curtime, so I have to wonder if it should set override_curtime to dup_time.setcurtime(), of if some global just isn't doing it for me.

-- 
You received this question notification because you are a member of
duplicity-team, which is an answer contact for Duplicity.