Minor refactor for arg parsing.
This commit is contained in:
parent
79973b7f11
commit
35a303caa8
@ -170,10 +170,10 @@ def main():
|
|||||||
arguments = parser.parse_args()
|
arguments = parser.parse_args()
|
||||||
|
|
||||||
# Session Token Variables
|
# Session Token Variables
|
||||||
api_base_url = arguments.api_base_url if arguments.api_base_url else os.environ.get("API_BASE_URL")
|
api_base_url = arguments.api_base_url or os.environ.get("API_BASE_URL")
|
||||||
client_id = arguments.client_id if arguments.client_id else os.environ.get("CLIENT_ID")
|
client_id = arguments.client_id or os.environ.get("CLIENT_ID")
|
||||||
client_secret = arguments.client_secret if arguments.client_secret else os.environ.get("CLIENT_SECRET")
|
client_secret = arguments.client_secret or os.environ.get("CLIENT_SECRET")
|
||||||
access_token = arguments.access_token if arguments.access_token else os.environ.get("ACCESS_TOKEN")
|
access_token = arguments.access_token or os.environ.get("ACCESS_TOKEN")
|
||||||
|
|
||||||
# Flag if the bot is running in debug mode
|
# Flag if the bot is running in debug mode
|
||||||
debug_mode = arguments.dry_run or arguments.debug
|
debug_mode = arguments.dry_run or arguments.debug
|
||||||
|
Loading…
Reference in New Issue
Block a user