Last active
February 4, 2019 21:38
-
-
Save talfco/e094310cbe9db9d99f6e07dd5c2a97b1 to your computer and use it in GitHub Desktop.
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
class GovernmentSocialMediaAnalyzer(object): | |
# Class Instance Variable | |
__cfg = {} | |
__country_code = None | |
__api = None | |
def __init__(self, country_code): | |
self.__country_code = country_code | |
# Dependent on the country parameter load the relevant configurations | |
file_name = "config-"+country_code+".yaml" | |
with open("../../cfg/"+file_name, 'r') as stream: | |
try: | |
self.__cfg= yaml.load(stream) | |
print(self) | |
except yaml.YAMLError as exc: | |
print("Config File ", file_name, " wrong format", exc) | |
exit(1) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment