Created
June 8, 2017 13:42
-
-
Save robert-chiniquy/cc66a57ecc06ff8165cdec85c13f084d to your computer and use it in GitHub Desktop.
for mckraken
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env python | |
import subprocess | |
import syslog | |
import sys | |
import os | |
def open_sft_url_handler(url_string): | |
syslog.syslog("ScaleFT: Opening URL: " + url_string) | |
try: | |
subprocess.check_call(["sft", "_url_handler", url_string]) | |
except Exception, e: | |
syslog.syslog("ScaleFT: Opening URL Failed: " + str(e)) | |
sys.stderr.write("ScaleFT: Opening URL Failed: " + str(e) + "\n") | |
sys.exit(1) | |
if __name__ == "__main__": | |
url_string = sys.argv[1] | |
open_sft_url_handler(url_string) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment