Add logging and fix toot command error
This commit is contained in:
parent
7dedbd4f66
commit
498eb52fc3
3
bot.py
3
bot.py
|
@ -15,7 +15,8 @@ def log(s):
|
|||
f.write(s.rstrip()+"\n")
|
||||
|
||||
def toot(s,tootjson="/usr/local/bin"):
|
||||
return subprocess.call(["/usr/local/bin/toot",s],env={"TOOT_JSON_PATH":tootjson})
|
||||
with open(os.path.expanduser("~/minerbot2.log"),"a") as f:
|
||||
return subprocess.call(["/usr/local/bin/toot",s],env={"TOOT_JSON_PATH":tootjson,"LANG":"C.UTF-8","LC_ALL":"C.UTF-8"},stdout=f,stderr=subprocess.STDOUT)
|
||||
|
||||
gttapi = gitea.GiteaAPI("https://tildegit.org")
|
||||
#ghapi = github.GithubAPI()
|
||||
|
|
Loading…
Reference in New Issue