Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Moved API keys to a compiled Python file. not going to stop someone d…

…etermined but better than plain text.
  • Loading branch information...
commit 7d5d20d77dbe99345afd357a184af6ba2d465a75 1 parent 0b5d9ef
Giles Lavelle authored
9 .gitignore
... ... @@ -1,8 +1,11 @@
1   -*/api.json
2 1 *.sublime-project
3 2 *.sublime-workspace
4   -test.txt
5   -test.png
  3 +
6 4 *.pyc
  5 +
  6 +!src/lib/apikeys.pyc
  7 +src/lib/apikeys.py
  8 +
7 9 clipcloud/*
  10 +
8 11 *.DS_Store
BIN  src/lib/apikeys.pyc
Binary file not shown
6 src/lib/dbox.py
... ... @@ -1,8 +1,11 @@
1 1 import webbrowser
2 2 import json
  3 +
3 4 from dropbox.session import DropboxSession
4 5 from dropbox.client import DropboxClient
  6 +
5 7 from lib.settings import *
  8 +from lib.apikeys import *
6 9 from lib.message import Message
7 10
8 11
@@ -17,8 +20,7 @@ def __init__(self, in_user_mode=True):
17 20
18 21 self.m = Message(in_user_mode=in_user_mode)
19 22
20   - api_details = json.load(open('lib/dropbox/api.json'))['dropbox']
21   - session = DropboxSession(api_details['key'], api_details['secret'], self.ACCESS_TYPE)
  23 + session = DropboxSession(API_KEY, API_SECRET, self.ACCESS_TYPE)
22 24
23 25 # if there is a token saved, that can be used to connect with dropbox
24 26 if os.path.exists(TOKEN_PATH):
6 src/lib/dropbox/api.json
... ... @@ -1,6 +0,0 @@
1   -{
2   - "dropbox": {
3   - "key": "dysgzktky4zqbib",
4   - "secret": "46s2f1c7oc1aoxw"
5   - }
6   -}

0 comments on commit 7d5d20d

Please sign in to comment.
Something went wrong with that request. Please try again.