|
From: | Charles Knowlton |
Subject: | Re: [Duplicity-talk] Setting the PASSPHRASE inside the duplicity program itself |
Date: | Mon, 26 Mar 2007 15:41:19 -0500 |
I have another quick question. When I run duplicity sometimes(not every time) I get this message:duplicity-inc.2007-03-26T14:33:13-05:00.to. 2007-03-26T14:35:12-05:00.manife 100% 174 0.2KB/s 00:00
Traceback (most recent call last): File "/usr/bin/duplicity2", line 381, in ? if __name__ == "__main__": main() File "/usr/bin/duplicity2", line 370, in main check_last_manifest(col_stats) File "/usr/bin/duplicity2", line 350, in check_last_manifest last_backup_set.check_manifests()File "/usr/lib/python2.3/site-packages/duplicity/collections.py", line 128, in check_manifests
if local_manifest: remote_manifest = local_manifestUnboundLocalError: local variable 'local_manifest' referenced before assignment
And other times I won't. Is something missing in regards to Python? On Mar 26, 2007, at 3:33 PM, Charles Knowlton wrote:
The reason I want the passphrase in the program itself so that if an intruder were to get into my server it wouldn't be easy for them do figure it out. If it is directly in the cron(I plan on running duplicity with cron) then the intruder could figure it out real easy compared to knowing that the passphrase is in the program itselfThanks for helping me out. Regards, Charles Knowlton On Mar 26, 2007, at 3:20 PM, Steven Willoughby wrote: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: passif not globals.encryption: return "" # assume we don't need passphrasereturn "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 blockI 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 afunction 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_______________________________________________ Duplicity-talk mailing list address@hidden http://lists.nongnu.org/mailman/listinfo/duplicity-talk
[Prev in Thread] | Current Thread | [Next in Thread] |