mirror of
https://github.com/darkrenaissance/darkfi.git
synced 2026-01-10 07:08:05 -05:00
tau: fix a big in set_comment RPC, and exit with no access msg accordingly
This commit is contained in:
@@ -78,8 +78,7 @@ async def fetch_archive_task(task_refid, month_ts, server_name, port):
|
||||
return await query("fetch_archive_task", [task_refid, str(month_ts)], server_name, int(port))
|
||||
|
||||
async def add_task_comment(refid, comment, server_name, port):
|
||||
await query("set_comment", [refid, comment], server_name, int(port))
|
||||
return True
|
||||
return await query("set_comment", [refid, comment], server_name, int(port))
|
||||
|
||||
async def export_to(path, server_name, port):
|
||||
return await query("export", [path], server_name, int(port))
|
||||
|
||||
@@ -460,7 +460,8 @@ async def comment(refid, args, server_name, port):
|
||||
exit(-1)
|
||||
|
||||
if not await api.add_task_comment(refid, comment, server_name, port):
|
||||
return -1
|
||||
print("You don't have write access")
|
||||
exit(-1)
|
||||
|
||||
# Two json rpcs back to back cause Unexpected EOF error
|
||||
time.sleep(0.1)
|
||||
|
||||
Reference in New Issue
Block a user