Skip to content

Commit 65a680e

Browse files
committed
Minor fixes
1 parent a736306 commit 65a680e

File tree

5 files changed

+15
-17
lines changed

5 files changed

+15
-17
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
*.pyc

README.md

-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ Dependencies:
1717
* random
1818
* re
1919
* requests
20-
* requests
2120
* time
2221
* urllib
2322
* urlparse

README.rst

+6-7
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ Veridu Python SDK
33

44
Installation
55
------------
6-
This library can be found on [PyPi](https://pypi.python.org/pypi/veridu-python).
7-
The recommended way to install this is through [pip](https://pypi.python.org/pypi/pip).
6+
This library can be found on PyPi (https://pypi.python.org/pypi/veridu-python).
7+
The recommended way to install this is through pip (https://pypi.python.org/pypi/pip).
88

99
```bash
1010
$ pip install veridu-python
@@ -17,15 +17,14 @@ Dependencies:
1717
* random
1818
* re
1919
* requests
20-
* requests
2120
* time
2221
* urllib
2322
* urlparse
2423

2524
Bugs and feature requests
2625
-------------------------
27-
Have a bug or a feature request? [Please open a new issue](https://github.com/veridu/veridu-python/issues).
28-
Before opening any issue, please search for existing issues and read the [Issue Guidelines](https://github.com/necolas/issue-guidelines), written by [Nicolas Gallagher](https://github.com/necolas/).
26+
Have a bug or a feature request? Please open a new issue (https://github.com/veridu/veridu-python/issues).
27+
Before opening any issue, please search for existing issues and read the Issue Guidelines (https://github.com/necolas/issue-guidelines), written by Nicolas Gallagher (https://github.com/necolas/).
2928

3029
Versioning
3130
----------
@@ -41,9 +40,9 @@ And constructed with the following guidelines:
4140
* New additions without breaking backward compatibility bumps the minor (and resets the patch)
4241
* Bug fixes and misc changes bumps the patch
4342

44-
For more information on SemVer, please visit [http://semver.org/](http://semver.org/).
43+
For more information on SemVer, please visit http://semver.org/.
4544

4645
Copyright and license
4746
---------------------
4847

49-
Copyright (c) 2013/2016 - Veridu Ltd - [http://veridu.com](veridu.com)
48+
Copyright (c) 2013/2016 - Veridu Ltd - http://veridu.com

Veridu/SDK/API.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ def __init__(self, key, secret, version="0.3"):
2121
self.session = None
2222
self.headers = {
2323
"Veridu-Client": key,
24-
"User-Agent": "Veridu-Python/0.1.1"
24+
"User-Agent": "Veridu-Python/0.1.2"
2525
}
2626

2727
def setSession(self, session):

Veridu/SDK/Session.py

+7-8
Original file line numberDiff line numberDiff line change
@@ -29,15 +29,14 @@ def getUsername(self):
2929
return self.username
3030

3131
def create(self, readOnly=False):
32-
if self.api.getSession() is None:
33-
if readOnly:
34-
json = self.api.signedFetch("POST", "session/read")
35-
else:
36-
json = self.api.signedFetch("POST", "session/write")
32+
if readOnly:
33+
json = self.api.signedFetch("POST", "session/read")
34+
else:
35+
json = self.api.signedFetch("POST", "session/write")
3736

38-
self.api.setSession(json["token"])
39-
self.setToken(json["token"])
40-
self.setExpires(json["expires"])
37+
self.api.setSession(json["token"])
38+
self.setToken(json["token"])
39+
self.setExpires(json["expires"])
4140

4241
def extend(self):
4342
if self.token is None:

0 commit comments

Comments
 (0)