This is an automated email from the ASF dual-hosted git repository.

chug pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/qpid-dispatch.git


The following commit(s) were added to refs/heads/master by this push:
     new 132dac7  DISPATCH-1584: Transfers may not always have delivery-id and 
delivery-tag
132dac7 is described below

commit 132dac73eda259fb24e0ed3e7bf77f7c8e28f55e
Author: Chuck Rolke <[email protected]>
AuthorDate: Wed Feb 26 13:53:11 2020 -0500

    DISPATCH-1584: Transfers may not always have delivery-id and delivery-tag
---
 tools/scraper/parser.py | 21 +++++++++++++--------
 1 file changed, 13 insertions(+), 8 deletions(-)

diff --git a/tools/scraper/parser.py b/tools/scraper/parser.py
index 1ebb1d0..1a2ed92 100755
--- a/tools/scraper/parser.py
+++ b/tools/scraper/parser.py
@@ -237,16 +237,21 @@ class DescribedType:
         self.add_field_to_dict(fHandle)
         self.line = self.line[(len(fHandle) + 1):]
 
-        fDelId = self.line.split()[0]
-        self.add_field_to_dict(fDelId)
-        self.line = self.line[(len(fDelId) + 1):]
+        try:
+            fDelId = self.line.split()[0]
+            self.add_field_to_dict(fDelId)
+            self.line = self.line[(len(fDelId) + 1):]
 
-        # process fields from tail
-        while len(self.line) > 0 and self.process_transfer_tail_key():
-            pass
+            # process fields from tail
+            while len(self.line) > 0 and self.process_transfer_tail_key():
+                pass
 
-        # the remainder, no matter how unlikely, must be the delivery-tag
-        self.add_field_to_dict(self.line, "delivery-tag")
+            # the remainder, no matter how unlikely, must be the delivery-tag
+            self.add_field_to_dict(self.line, "delivery-tag")
+        except:
+            # delivery-id and delivery-tag are optional in subsequent transfers
+            # when more=true.
+            pass
 
     def parse_dtype_line(self, _dtype, _line):
         """


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to