Charles Knowlton wrote:
How would I set the PASSPHRASE inside the duplicity program itself?
I'm not sure why you would want to do this instead of using the
environment variable.
I am looking at this section of code:
def get_passphrase():
"""Get passphrase from environment or, failing that, from user"""
try: return os.environ['PASSPHRASE']
All you need to do is:
def get_passphrase():
"""Get passphrase from environment or, failing that, from user"""
try: return os.environ['PASSPHRASE']
except KeyError: pass
if not globals.encryption: return "" # assume we don't need
passphrase
return "blarg"
The rest of the function would then no longer be necessary.
I had tried setting the variable pass1 = 'test'
but that didn't work. I got this error message:
File "/usr/bin/duplicity2", line 38
self_pass1 = "crap"
^
IndentationError: expected an indented block
I don't have a clue as to what it means and I don't know anything
about Python.
Python is whitespace dependent. It cares about the number of spaces or
tabs at the beginning of each line as that is how it determines when a
function definition ends. The line that you changed should begin with
two tab characters.
Steven
_______________________________________________
Duplicity-talk mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/duplicity-talk