Skip to content

Commit

Permalink
yaml safe load
Browse files Browse the repository at this point in the history
  • Loading branch information
Nixellion committed Jan 13, 2023
1 parent 65ee62a commit e53e710
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion app.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@

# Read config
with open(os.path.join(appdir, 'config.yaml'), 'r') as f:
config = yaml.load(f.read())
config = yaml.safe_load(f.read())

# Fetch todoist items
todoist_api = TodoistAPI(config['todoist_token'])
Expand Down
2 changes: 1 addition & 1 deletion asana_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ def get_user_id_by_name(self, user_name):
if __name__ == "__main__":
# Testing
with open(os.path.join(appdir, 'config.yaml'), 'r') as f:
config = yaml.load(f.read())
config = yaml.safe_load(f.read())
print(AsanaAPI(config['asana'][0]['personal_access_token']).get_workspaces())

# for task in AsanaAPI(config['asana'][0]['personal_access_token']).get_tasks(config['asana'][0]['task_params']):
Expand Down
2 changes: 1 addition & 1 deletion icalendar_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
appdir = os.path.dirname(os.path.realpath(__file__)) # rp, realpath

with open(os.path.join(appdir, 'config.yaml'), 'r') as f:
config = yaml.load(f.read())
config = yaml.safe_load(f.read())


local = pytz.timezone(config['local_timezone'])
Expand Down
2 changes: 1 addition & 1 deletion restore_from_backup_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
appdir = os.path.dirname(os.path.realpath(__file__))

with open(os.path.join(appdir, 'config.yaml'), 'r') as f:
config = yaml.load(f.read())
config = yaml.safe_load(f.read())
api = TodoistAPI(config['todoist_token'])


Expand Down
2 changes: 1 addition & 1 deletion todoist_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,5 +100,5 @@ def add_item(self, item_data):
if __name__ == "__main__":
# Testing
with open(os.path.join(appdir, 'config.yaml'), 'r') as f:
config = yaml.load(f.read())
config = yaml.safe_load(f.read())
print(TodoistAPI(config['todoist_token']).get_items("projects"))

0 comments on commit e53e710

Please sign in to comment.