[Pkg-owncloud-commits] [python-owncloud] 65/96: Make keyring not to use as default.
Sandro Knauß
hefee-guest at moszumanska.debian.org
Fri Nov 22 01:28:28 UTC 2013
This is an automated email from the git hooks/post-receive script.
hefee-guest pushed a commit to branch master
in repository python-owncloud.
commit bb88037e1de79fda51b8bd013c038a59b9f706fc
Author: hefee <hefee at netzguerilla.net>
Date: Thu Mar 28 22:58:19 2013 +0100
Make keyring not to use as default.
Fix #19
---
csync/csync.py | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/csync/csync.py b/csync/csync.py
index 3b2fa68..6b030f4 100755
--- a/csync/csync.py
+++ b/csync/csync.py
@@ -25,7 +25,7 @@ PASSWORD = ''
PASSWORD_SAFE = '********'
SSLFINGERPRINT = ''
DEBUG = False
-NOT_USE_KEYRING = False
+USE_KEYRING = False
def authCallback(prompt, buffer, bufferLength, echo, verify, userData):
"""
@@ -42,7 +42,7 @@ def authCallback(prompt, buffer, bufferLength, echo, verify, userData):
if 'username' in prompt:
ret = USERNAME
elif 'password' in prompt:
- if keyring and not NOT_USE_KEYRING:
+ if keyring and USE_KEYRING:
print "using password from keyring"
ret = keyring.get_password('ownCloud', USERNAME)
if ret is None:
@@ -50,7 +50,7 @@ def authCallback(prompt, buffer, bufferLength, echo, verify, userData):
ret = getpass.getpass('ownCloud password:')
else:
ret = PASSWORD
- if keyring and not NOT_USE_KEYRING:
+ if keyring and USE_KEYRING:
print "saving password to keyring"
keyring.set_password('ownCloud', USERNAME, ret)
elif 'SSL' in prompt:
@@ -88,11 +88,11 @@ class ownCloudSync():
def __init__(self, cfg = None):
"""initialize"""
self.cfg = cfg
- global USERNAME, PASSWORD, SSLFINGERPRINT, NOT_USE_KEYRING
+ global USERNAME, PASSWORD, SSLFINGERPRINT, USE_KEYRING
USERNAME = cfg['user']
PASSWORD = cfg['pass']
SSLFINGERPRINT = cfg['sslfingerprint']
- NOT_USE_KEYRING = cfg['not-use-keyring']
+ USE_KEYRING = cfg['use-keyring']
libVersion = csynclib.csync_version(0,40,1)
if DEBUG:
print 'libocsync version: ', libVersion
@@ -341,7 +341,7 @@ Password options:
parser.add_argument('--url', nargs='?', default = None,
help = "URL to sync to.")
if keyring:
- parser.add_argument('--not-use-keyring', action = 'store_true', default = False,
+ parser.add_argument('--use-keyring', action = 'store_true', default = False,
help = "use keyring if available to store password safely.")
args = vars(parser.parse_args())
startSync(args)
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/python-owncloud.git
More information about the Pkg-owncloud-commits
mailing list