Browse Source

tau: prevent empty comments on tasks

dasman 2 years ago
parent
commit
77533a5312
1 changed files with 4 additions and 0 deletions
  1. 4 0
      bin/tau/tau-python/tau

+ 4 - 0
bin/tau/tau-python/tau

@@ -432,6 +432,10 @@ async def comment(refid, args, server_name, port):
     else:
         comment = " ".join(args)
 
+    if comment.strip() == '':
+        print("Abort adding comment due to empty content.")
+        exit(-1)
+
     if not await api.add_task_comment(refid, comment, server_name, port):
         return -1