Set execute permissions on generated script

This commit is contained in:
Jesse Li
2018-05-09 12:50:42 -04:00
parent af7c6f4f8e
commit 2a908acf05

View File

@ -13,6 +13,7 @@ from datetime import datetime, timedelta
import itertools import itertools
import json import json
import math import math
import os
try: try:
# Python 3+ # Python 3+
from urllib.error import HTTPError, URLError from urllib.error import HTTPError, URLError
@ -329,6 +330,7 @@ def save(output, filename):
"""Saves the list to a given filename""" """Saves the list to a given filename"""
with open(filename, 'w') as f: with open(filename, 'w') as f:
f.write(output) f.write(output)
os.chmod(filename, 0o755) # add execute permissions
def request_user_input(prompt='> '): def request_user_input(prompt='> '):