[Pkg-owncloud-commits] [python-owncloud] 05/33: if no url is defined in config file and in commandline arguments we should throw a better error message. Fixes #35

Sandro Knauß hefee-guest at moszumanska.debian.org
Fri Nov 22 01:49:46 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 4232c884ee747a08c3267e122b28dc4cd4feb085
Author: hefee <hefee at netzguerilla.net>
Date:   Sat Jun 15 12:29:18 2013 +0200

    if no url is defined in config file and in commandline arguments we should throw a better error message.
    Fixes #35
---
 csync/csync.py |    6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/csync/csync.py b/csync/csync.py
index 391c768..b3ec456 100755
--- a/csync/csync.py
+++ b/csync/csync.py
@@ -113,9 +113,9 @@ class ownCloudSync():
 	def buildURL(self):
 		"""build the URL we use for owncloud"""
 		url = self.cfg['url']
-		if url == '':
+		if not url:
 			print 'You must specify a url, use --url, or put in cfg file.'
-			sys.exit(1j)
+			sys.exit(1)
 		url = url.replace('https','ownclouds')
 		url = url.replace('http','owncloud')
 		#add / if needed
@@ -134,8 +134,6 @@ class ownCloudSync():
 			print 'buildURL: ', url
 		return
 
-
-
 	def sync(self):
 		r = csynclib.csync_create(self.ctx, self.cfg['src'], self.cfg['url'])
 		if r != 0:

-- 
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