fixed it for real this time oops

This commit is contained in:
Lynne 2018-10-26 00:35:25 +10:00
parent 63fa34b6c7
commit a3fb1ba111
1 changed files with 6 additions and 5 deletions

9
gen.py
View File

@ -15,11 +15,12 @@ parser.add_argument('-s', '--simulate', dest='simulate', action='store_true',
args = parser.parse_args() args = parser.parse_args()
cfg = json.load(open('config.json', 'r')) cfg = json.load(open('config.json'))
client = Mastodon( client = Mastodon(
client_id="clientcred.secret", client_id=cfg['client']['id'],
access_token="usercred.secret", client_secret=cfg['client']['secret'],
access_token=cfg['secret'],
api_base_url=cfg['site']) api_base_url=cfg['site'])
toot = create.make_toot() toot = create.make_toot()
@ -34,7 +35,7 @@ if not args.simulate:
except Exception as err: except Exception as err:
toot = { toot = {
"toot": "toot":
"Mistress @lynnesbian@deadinsi.de, something has gone terribly" \ "Mistress @lynnesbian@fedi.lynnesbian.space, something has gone terribly" \
+ " wrong! While attempting to post a toot, I received the following" \ + " wrong! While attempting to post a toot, I received the following" \
+ " error:\n" + "\n".join(traceback.format_tb(sys.exc_info()[2])) + " error:\n" + "\n".join(traceback.format_tb(sys.exc_info()[2]))
} }