zephyr_mirror: Read in API keys from a file in your MIT homedir.

(imported from commit eb0fcf032b26388da1785d41bd182218559bfd06)
This commit is contained in:
Tim Abbott 2012-10-18 10:37:34 -04:00
parent 30d1dda8ed
commit 5fe0487783

View file

@ -53,10 +53,14 @@ parser.add_option('--site',
action='store')
parser.add_option('--api-key',
dest='api_key',
default="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
default=None,
action='store')
(options, args) = parser.parse_args()
if options.api_key is None:
api_key_file = os.path.join(os.environ["HOME"], "Private", ".humbug-api-key")
options.api_key = file(api_key_file).read().strip()
sys.path.append(".")
sys.path.append(os.path.dirname(os.path.dirname(__file__)))
import api.common