[Pkg-owncloud-commits] [python-owncloud] 20/96: issue #6, fix the url option in the cfg file, add more debugging for cfg files

Sandro Knauß hefee-guest at moszumanska.debian.org
Fri Nov 22 01:28:23 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 7e0543a16a553c3594b77cf57e20e03e4c06a2d4
Author: craig <craig at lasalle.yumaed.org>
Date:   Mon Mar 11 11:16:47 2013 -0700

    issue #6, fix the url option in the cfg file, add more debugging for cfg files
---
 csync.py |   10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/csync.py b/csync.py
index 9170379..9ee83b9 100755
--- a/csync.py
+++ b/csync.py
@@ -213,13 +213,19 @@ def getConfig(args):
 			cfgFile = os.path.join(cfgPath, 'owncloud.cfg')
 	if cfgFile:
 		with open(cfgFile) as fd:
-			"""We use the INI file format that Mirall does. we allow more 
+			"""We use the INI file format that Mirall does. we allow more
 			things in the cfg file...
 				pass: the password
 			"""
 			c = ConfigParser.SafeConfigParser()
 			c.readfp(fd)
 			cfg = dict(c.items('ownCloud'))
+			if DEBUG:
+				print 'conifguration info received from %s:' % cfgFile
+				pcfg = copy.copy(cfg)
+				if pcfg['pass']:
+					pcfg['pass'] = PASSWORD_SAFE
+					pprint.pprint(pcfg)
 	cfg.setdefault('pass', '')
 	cfg.setdefault('sslFingerprint', '')
 	cfg.setdefault('davPath', 'remote.php/webdav/')
@@ -304,7 +310,7 @@ Password options:
 		 help = "local Directory to sync with")
 	parser.add_argument('-d', '--dst', nargs='?', default = 'clientsync',
 		help = "folder on server.")
-	parser.add_argument('--url', nargs='?', default = '',
+	parser.add_argument('--url', nargs='?', default = None,
 		 help = "url to sync to.")
 	args = vars(parser.parse_args())
 	main(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