forked from toolforge/video2commons
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move config.py into video2commons directory
With the config moved into a json, there is no longer a good reason for it to be outside.
- Loading branch information
1 parent
3fd2877
commit 7e956b5
Showing
3 changed files
with
25 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#! /usr/bin/python | ||
# -*- coding: UTF-8 -*- | ||
# | ||
|
||
"""v2c config loading from json.""" | ||
|
||
import os as _os | ||
import json as _json | ||
|
||
try: | ||
with open(_os.path.dirname(_os.path.realpath(__file__)) + | ||
'/../config.json', 'r') as f: | ||
_data = _json.load(f) | ||
except IOError as _e: | ||
__import__('logging').exception(_e) | ||
_data = {} | ||
|
||
consumer_key = _data.get('consumer_key') | ||
consumer_secret = _data.get('consumer_secret') | ||
api_url = _data.get('api_url') | ||
redis_pw = _data.get('redis_pw') | ||
redis_host = _data.get('redis_host') | ||
session_key = _data.get('session_key') |