You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
**Unexpected** output in `stdout` is also easy to parse, because these things are not wrapped by any preset flags. They are usually caused by exceptions which can not be handled and cause current process to exit abnormally.
138
138
139
-
*`|v>ARGINF<v|` & `|^>ARGINF<^|`
140
-
*`|v>EXCEPT<v|` & `|^>EXCEPT<^|`
141
-
*`|v>STRING<v|` & `|^>STRING<^|`
142
-
*`|v>FORMAT<v|` & `|^>FORMAT<^|`
143
-
*`|v>ATTACH<v|` & `|^>ATTACH<^|`
144
-
*`|v>ILOGIN<v|` & `|^>ILOGIN<^|`
139
+
### 2.2.2. Meaning of each flag-line
140
+
141
+
The so called *flag-line* always appear in pair, with one indicating the start of messages and the other indicating the end. Different words wrapped by `>` and `<` indicate different message types.
142
+
143
+
*`|v>ARGINF<v|`&`|^>ARGINF<^|` Messages come from the patched `argparse.ArgumentParser`. This patched stuff would never call `sys.exit` when it fails in parsing. Usually the messages are used to inform you the parser is waiting for input or whether the parameters it read from `stdin` are legal.
144
+
145
+
*`|v>EXCEPT<v|`&`|^>EXCEPT<^|` It indicates that an exception has been caught and properly handled. Exceptions within the expected range could be various. Such as a socket error occurs (e.g. TCP connection timeout), or the Bugzilla server throws an error. These exceptions are not fatal, and indicate that this round is not successful, and it is best to directly jump into a new round.
146
+
147
+
*`|v>FORMAT<v|`&`|^>FORMAT<^|` Output stuff when using `--outputformat` option.
148
+
149
+
*`|v>ATTACH<v|`&`|^>ATTACH<^|` Output stuff from performing `attach` command.
150
+
151
+
*`|v>ILOGIN<v|`&`|^>ILOGIN<^|` Stuff about login or API key. In some situations, terminals will block in the next line of its *end-flag-line*, waiting for the user name, password, or API key to be written into `stdin`. For the interactive behavior about login, it is recommanded to check the methods with names beginning with `interactive_` in `base.py`.
152
+
153
+
*`|v>STRING<v|`&`|^>STRING<^|` Other general output stuff.
0 commit comments