diff options
author | piaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2012-04-12 23:56:10 +0800 |
---|---|---|
committer | piaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2012-04-12 23:56:10 +0800 |
commit | 507da2e1fd914e78a2d5a775cdfc79f44d014c11 (patch) | |
tree | b65f5aa73ce46332470df60e9b20600c6b3131ca | |
parent | 61d51a1fab7d1f2a6dd23f472237425dea5a450d (diff) | |
download | pttbbs-507da2e1fd914e78a2d5a775cdfc79f44d014c11.tar pttbbs-507da2e1fd914e78a2d5a775cdfc79f44d014c11.tar.gz pttbbs-507da2e1fd914e78a2d5a775cdfc79f44d014c11.tar.bz2 pttbbs-507da2e1fd914e78a2d5a775cdfc79f44d014c11.tar.lz pttbbs-507da2e1fd914e78a2d5a775cdfc79f44d014c11.tar.xz pttbbs-507da2e1fd914e78a2d5a775cdfc79f44d014c11.tar.zst pttbbs-507da2e1fd914e78a2d5a775cdfc79f44d014c11.zip |
revise brcstored.
git-svn-id: http://opensvn.csie.org/pttbbs/trunk@5629 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
-rwxr-xr-x | pttbbs/daemon/brcstored/brcstored.py | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/pttbbs/daemon/brcstored/brcstored.py b/pttbbs/daemon/brcstored/brcstored.py index 9df59c26..fd4d3bc2 100755 --- a/pttbbs/daemon/brcstored/brcstored.py +++ b/pttbbs/daemon/brcstored/brcstored.py @@ -1,4 +1,12 @@ #!/usr/bin/env python +# Copyright (c) 2012 Hung-Te Lin <piaip@csie.ntu.edu.tw>. All rights reserved. +# Use of this source code is governed by a BSD license. + +""" +brcstored: Board RC (brc) storage daemon. + +Provides a way to manage per-user BRC object into isolated database. +""" import StringIO import logging @@ -11,7 +19,7 @@ import struct _SERVER_ADDR = '127.0.0.1' _SERVER_PORT = 5133 -_DB_PATH = '/home/bbs/brcstore/db' +_DB_PATH = '/home/bbs/brcstore/database' def get_data(uid): @@ -54,7 +62,7 @@ def handle_request(sock, fd): logging.info('Write: %s: size=%d', uid, len(msg)) put_data(uid, msg) else: - raise ValueError('Unknown request: 0x%02X' % command) + raise ValueError('Unknown request: 0x%02X' % ord(command)) except: logging.exception("handle_request") finally: |