Skip to content

Commit aa42a55

Browse files
committed
added undefined command type for FTP commands
1 parent 40cef32 commit aa42a55

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

pcapkit/vendor/ftp/command.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,8 @@ def _missing_(cls, value: 'str') -> 'FEATCode':
9393
class CommandType(IntFlag):
9494
"""Type of "kind" of command, based on :rfc:`959#section-4.1`."""
9595
96+
undefined = 0
97+
9698
#: Access control.
9799
A = auto()
98100
#: Parameter setting.
@@ -127,7 +129,7 @@ class {NAME}(StrEnum):
127129
conf: 'ConformanceRequirement'
128130
129131
def __new__(cls, name: 'str', feat: 'Optional[FEATCode]' = None,
130-
desc: 'Optional[str]' = None, type: 'CommandType' = 0, # type: ignore[assignment]
132+
desc: 'Optional[str]' = None, type: 'CommandType' = CommandType.undefined,
131133
conf: 'ConformanceRequirement' = ConformanceRequirement.O) -> 'Type[{NAME}]':
132134
obj = str.__new__(cls, name)
133135
obj._value_ = name

0 commit comments

Comments
 (0)