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.