diff --git a/.gitignore b/.gitignore index 67886b7..c8dd074 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ build/ *.swp *.pyc sqrl.egg-info/ +.idea/ diff --git a/setup.py b/setup.py index 00df8a5..3888fbc 100644 --- a/setup.py +++ b/setup.py @@ -3,7 +3,7 @@ except: from disutils.core import setup -dependencies = ['docopt', 'ed25519', 'pyinotify'] +dependencies = ['docopt', 'ed25519', 'py-notify'] setup( name='sqrl', diff --git a/sqrl/client/request.py b/sqrl/client/request.py index 6362700..77e9bae 100644 --- a/sqrl/client/request.py +++ b/sqrl/client/request.py @@ -28,8 +28,10 @@ def __init__(self, url, public_key): self.http = httplib.HTTPConnection(self.url.netloc, timeout=9) def _path(self): - res = [self.url.path, "?", self.url.query, - "&", self.params.get()] + res = [self.url.path] + if not "?" in self.url.path: + res.append("?") + res.extend([self.url.query, "&", self.params.get()]) return "".join(res) def get_url(self): diff --git a/sqrl/sqrl.py b/sqrl/sqrl.py index 4b3f506..aaef92b 100755 --- a/sqrl/sqrl.py +++ b/sqrl/sqrl.py @@ -22,7 +22,7 @@ from docopt import docopt VERSION = "0.0.2" -HOME = os.environ['HOME'] +HOME = os.getenv('HOME') or os.getenv('USERPROFILE') CONFIG_DIR = '.config/sqrl/' WORKING_DIR = HOME + '/' + CONFIG_DIR