/mandos/trunk

To get this branch, use:
bzr branch http://bzr.recompile.se/loggerhead/mandos/trunk

« back to all changes in this revision

Viewing changes to server.py

  • Committer: Teddy Hogeborn
  • Date: 2008-01-18 20:11:37 UTC
  • Revision ID: teddy@fukt.bsnet.se-20080118201137-oxhupsfl5ut9cjz5
* server.py (server_metaclass): New.
  (IPv6_UDPServer, IPv6_TCPServer): Use "server_metaclass" instead of
  "server_bind" and "init_with_options".  Removed "address_family" and
  "allow_reuse_address", since they are now added in "server_metaclass".
  (server_bind, init_with_options): Removed.
  
  (main): Pass "options" to Client constructor.
  (Client.__init__): Take an "options" parameter and use it.

Show diffs side-by-side

added added

removed removed

Lines of Context:
123
123
 
124
124
in6addr_any = "::"
125
125
 
 
126
cred = None
 
127
 
126
128
def string_to_delta(interval):
127
129
    """Parse a string and return a datetime.timedelta
128
130
 
156
158
        raise ValueError
157
159
    return delta
158
160
 
159
 
 
160
161
def main():
161
162
    parser = OptionParser()
162
163
    parser.add_option("-i", "--interface", type="string",