Peter Surda
3033520995
- rearrange obsolete build scripts - rearrange working build scripts - add build / devel scripts I use - add existing development tests (bloom filter, message encoding, thread interrupts) - add directory descriptions
28 lines
607 B
Python
28 lines
607 B
Python
import importlib
|
|
from os import listdir, path
|
|
from pprint import pprint
|
|
import sys
|
|
import traceback
|
|
|
|
data = {"": "message", "subject": "subject", "body": "body"}
|
|
#data = {"": "vote", "msgid": "msgid"}
|
|
#data = {"fsck": 1}
|
|
|
|
import messagetypes
|
|
|
|
if __name__ == '__main__':
|
|
try:
|
|
msgType = data[""]
|
|
except KeyError:
|
|
print "Message type missing"
|
|
sys.exit(1)
|
|
else:
|
|
print "Message type: %s" % (msgType)
|
|
msgObj = messagetypes.constructObject(data)
|
|
if msgObj is None:
|
|
sys.exit(1)
|
|
try:
|
|
msgObj.process()
|
|
except:
|
|
pprint(sys.exc_info())
|