Skip to content

Commit c9e9bcd

Browse files
committed
connection.py: Add check to catch defined but empty .session attribute before closing session
README.md: Fix typo
1 parent fd603a4 commit c9e9bcd

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

O365/connection.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -857,8 +857,8 @@ def __del__(self):
857857
There is no guarantee that this method will be called by the garbage collection
858858
But this is not an issue because this connections will be automatically closed.
859859
"""
860-
if hasattr(self, 'session'):
861-
self.session.close()
860+
if hasattr(self, 'session') and self.session is not None:
861+
self.session.close()
862862

863863

864864
def oauth_authentication_flow(client_id, client_secret, scopes=None,

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ The project is currently developed and maintained by [Janscas](https://github.co
2121
**We are always open to new pull requests!**
2222

2323
#### Rebuilding HTML Docs
24-
- Install `shpinx` python library
24+
- Install `sphinx` python library
2525

2626
`pip install sphinx==2.2.2`
2727

0 commit comments

Comments
 (0)