From 0556a7eb89d3bde0e1606ed2f805b0676480f6f6 Mon Sep 17 00:00:00 2001
From: Joshua Hunter <hunterji@gmail.com>
Date: Fri, 20 Jan 2017 18:04:07 -0800
Subject: [PATCH] Commit database after creating oauth_tokens table. Fixes #75
Bug-Debian: https://bugs.debian.org/1092711

This change seems to be required in Python 3.6.0. It works correctly
without the db.commit() in 3.5.2 and earlier. Without the commit the
first table, oauth_cache_db_version, gets created, but oauth_tokens
does not.
---
 flickrapi/tokencache.py | 2 ++
 1 file changed, 2 insertions(+)

--- a/flickrapi/tokencache.py
+++ b/flickrapi/tokencache.py
@@ -170,6 +170,8 @@ class OAuthTokenCache(object):
 
         db.commit()
 
+        db.commit()
+
     @property
     def token(self):
         """Return the cached token for this API key, or None if not found."""
