mirror of https://github.com/x89/Shreddit
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
286 B
18 lines
286 B
9 years ago
|
#!/usr/bin/env python
|
||
|
'''
|
||
|
Simple script to check if your oauth is working.
|
||
|
'''
|
||
|
import praw
|
||
|
import sys
|
||
|
|
||
|
r = praw.Reddit('Shreddit oauth test')
|
||
|
try:
|
||
|
r.refresh_access_information()
|
||
|
if r.is_oauth_session():
|
||
|
sys.exit(0)
|
||
|
else:
|
||
|
sys.exit(2)
|
||
|
except:
|
||
|
sys.exit(1)
|
||
|
|