Use enum.Enum

This commit is contained in:
Juhani Haverinen 2016-08-01 21:04:32 +03:00
parent bf9877fc1f
commit a1b33985d3
1 changed files with 2 additions and 1 deletions

View File

@ -1,3 +1,4 @@
import enum
import os import os
import select import select
import socket import socket
@ -67,7 +68,7 @@ def drop_privileges():
except: except:
die('Unable to drop privileges') die('Unable to drop privileges')
class Protocol: class Protocol(enum.Enum):
gopher, http = range(2) gopher, http = range(2)
class RequestError(Exception): class RequestError(Exception):