mirror of
https://github.com/Hopiu/linkchecker.git
synced 2026-03-22 17:00:25 +00:00
git-svn-id: https://linkchecker.svn.sourceforge.net/svnroot/linkchecker/trunk/linkchecker@5 e7d03fd6-7b0d-0410-9947-9c21f3af8025
16 lines
330 B
Python
16 lines
330 B
Python
# Opcode values in message header (section 4.1.1)
|
|
|
|
QUERY = 0
|
|
IQUERY = 1
|
|
STATUS = 2
|
|
|
|
# Construct reverse mapping dictionary
|
|
|
|
_names = dir()
|
|
opcodemap = {}
|
|
for _name in _names:
|
|
if _name[0] != '_': opcodemap[eval(_name)] = _name
|
|
|
|
def opcodestr(opcode):
|
|
if opcodemap.has_key(opcode): return opcodemap[opcode]
|
|
else: return `opcode`
|