mirror of
				https://github.com/MCV-Software/TWBlue.git
				synced 2025-11-04 13:57:05 +00:00 
			
		
		
		
	Read keys from environment
This commit is contained in:
		@@ -1,6 +1,7 @@
 | 
			
		||||
#! /usr/bin/env python# -*- coding: iso-8859-1 -*-
 | 
			
		||||
""" Write version info (taken from the last commit) to application.py. This method has been implemented this way for running updates.
 | 
			
		||||
This file is not intended to be called by the user. It will be used only by the Gitlab CI runner."""
 | 
			
		||||
import os
 | 
			
		||||
import requests
 | 
			
		||||
from codecs import open
 | 
			
		||||
 | 
			
		||||
@@ -28,8 +29,8 @@ file2.write(contents)
 | 
			
		||||
file2.close()
 | 
			
		||||
print("done")
 | 
			
		||||
file3 = open("appkeys.py", "w")
 | 
			
		||||
keys = """twitter_api_key = "daMHlXsFlalEWtaqTL7xd6TqZ"
 | 
			
		||||
twitter_api_secret = "lOcpsIlhr1lBpA53oNWwmKh9yM6Gqk3IRFOzq9TvAO8B5gisFD"
 | 
			
		||||
"""
 | 
			
		||||
keys = """twitter_api_key = {}
 | 
			
		||||
twitter_api_secret = {}
 | 
			
		||||
""".format(os.environ.get("TWITTER_API_KEY"), os.environ.get("TWITTER_API_SECRET"))
 | 
			
		||||
file3.write(keys)
 | 
			
		||||
file3.close()
 | 
			
		||||
		Reference in New Issue
	
	Block a user