[Pkg-owncloud-commits] [python-owncloud] 10/33: don't crash on missing BWLimit section
Sandro Knauß
hefee-guest at moszumanska.debian.org
Fri Nov 22 01:49:47 UTC 2013
This is an automated email from the git hooks/post-receive script.
hefee-guest pushed a commit to branch upstream
in repository python-owncloud.
commit 3a7a415efe96386a9f0b3ace9a070db904096390
Author: Lluís <lluis at ingent.net>
Date: Tue Sep 10 14:04:16 2013 +0200
don't crash on missing BWLimit section
---
csync/csync.py | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/csync/csync.py b/csync/csync.py
index 1462a4f..33b0081 100755
--- a/csync/csync.py
+++ b/csync/csync.py
@@ -261,7 +261,12 @@ def getConfig(parser):
if csynclib.csync_version(CSYNC_VERSION_INT(0,81,0)) is None:
cfg = dict(c.items('ownCloud'))
else:
- cfg = dict(c.items('BWLimit') + c.items('ownCloud'))
+ if c.has_section('BWLimit'):
+ cfg = dict(c.items('BWLimit') + c.items('ownCloud'))
+ else:
+ if DEBUG:
+ print 'config file has no section [BWLimit]'
+ cfg = dict(c.items('ownCloud'))
if DEBUG:
print 'conifguration info received from %s:' % cfgFile
pcfg = copy.copy(cfg)
--
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