Explorar el Código

tau: prevent empty comments on tasks

dasman hace 2 años
padre
commit
77533a5312
Se han modificado 1 ficheros con 4 adiciones y 0 borrados
  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:
     else:
         comment = " ".join(args)
         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):
     if not await api.add_task_comment(refid, comment, server_name, port):
         return -1
         return -1