From b0f4accdced1a7482dca4b66587d9e1344c1344f Mon Sep 17 00:00:00 2001 From: ospalh Date: Mon, 16 Dec 2013 11:06:05 +0100 Subject: [PATCH] Looks like the old code missed a 'self.'. Simplified a bit. --- ankisyncd/sync_app.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/ankisyncd/sync_app.py b/ankisyncd/sync_app.py index 3573307..8d41354 100644 --- a/ankisyncd/sync_app.py +++ b/ankisyncd/sync_app.py @@ -297,10 +297,8 @@ class SyncApp(object): self.collection_manager = getCollectionManager() # make sure the base_url has a trailing slash - if len(self.base_url) == 0: - self.base_url = '/' - elif self.base_url[-1] != '/': - self.base_url = base_url + '/' + if not self.base_url.endswith('/'): + self.base_url += '/' def generateHostKey(self, username): """Generates a new host key to be used by the given username to identify their session.