[Pkg-owncloud-commits] [python-owncloud] 23/96: issue #6 added moreUI stuff
Sandro Knauß
hefee-guest at moszumanska.debian.org
Fri Nov 22 01:28:24 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 827646eec775e78098baf261fcc6392207ac47b8
Author: craig <craig at lasalle.yumaed.org>
Date: Mon Mar 11 15:10:15 2013 -0700
issue #6 added moreUI stuff
---
csync.py | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/csync.py b/csync.py
index d7ac72a..d044c5e 100755
--- a/csync.py
+++ b/csync.py
@@ -231,18 +231,13 @@ def getConfig(args):
if pcfg['pass']:
pcfg['pass'] = PASSWORD_SAFE
pprint.pprint(pcfg)
- cfg.setdefault('pass', '')
- cfg.setdefault('sslFingerprint', '')
cfg.setdefault('davPath', 'remote.php/webdav/')
- cfg.setdefault('url', '')
+ cfg.setdefault('sslFingerprint' '')
if os.environ.has_key('OCPASS'):
cfg['pass'] = os.environ['OCPASS']
if DEBUG:
print 'password coming from environment'
- #make sure we take it out if it's None, for environ option.
- if not args['pass']:
- del args['pass']
#cmd line arguments win out over config files.
cfg.update(args)
if DEBUG:
@@ -259,8 +254,13 @@ def main(args):
DEBUG = True
print 'turning debug on'
cfg = getConfig(args)
- sync = ownCloudSync(cfg)
-
+ try:
+ sync = ownCloudSync(cfg)
+ except KeyError:
+ exc_type, exc_value, exc_tb = sys.exc_info()
+ print 'sorry this option: %s is required, was not found in cfg file or on cmd line' % (exc_value)
+ if DEBUG:
+ raise
if __name__ == '__main__':
parser = argparse.ArgumentParser(
--
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