From 6a818f4bb46989903d42392d31e3d6f0b9e5bc09 Mon Sep 17 00:00:00 2001 From: Maks Snegov Date: Mon, 23 Jun 2014 00:50:21 +0400 Subject: [PATCH] fix: error with empty GET urls --- nevernote.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/nevernote.py b/nevernote.py index 26be95b..ecf5aba 100755 --- a/nevernote.py +++ b/nevernote.py @@ -56,7 +56,8 @@ def download_content(url, depth=0): else: raise NotImplementedError("protocol %s is not implemented" % up.scheme) - conn.request("GET", '?'.join((up.path, up.query)), None, headers) + requrl = ('?'.join((up.path, up.query)) if up.query else up.path) or '/' + conn.request("GET", requrl, None, headers) response = conn.getresponse() # follow redirects