Taking Transifex password from transifexrc

This commit is contained in:
ByteHamster 2019-05-12 18:22:51 +02:00
parent 627c943a7b
commit d8165126a1
1 changed files with 10 additions and 2 deletions

View File

@ -1,7 +1,15 @@
#!/usr/bin/env python3 #!/usr/bin/env python3
import requests import requests
import subprocess import subprocess
import configparser
import os
config = configparser.ConfigParser()
config.read(os.path.expanduser("~") + '/.transifexrc')
if 'https://www.transifex.com' in config:
TRANSIFEX_USER = config['https://www.transifex.com']['username']
TRANSIFEX_PW = config['https://www.transifex.com']['password']
else:
TRANSIFEX_USER = "" TRANSIFEX_USER = ""
TRANSIFEX_PW = "" TRANSIFEX_PW = ""