Changeset d891915 for skype/skyped.py
- Timestamp:
- 2008-05-19T18:22:03Z (17 years ago)
- Branches:
- master
- Children:
- 9627276
- Parents:
- d0a6a8c
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
skype/skyped.py
rd0a6a8c rd891915 31 31 import Skype4Py 32 32 import sha 33 from ConfigParser import ConfigParser 33 from ConfigParser import ConfigParser, NoOptionError 34 34 from traceback import print_exception 35 35 … … 183 183 self.help = False 184 184 self.host = "0.0.0.0" 185 self.port = 2727185 self.port = None 186 186 self.version = False 187 187 # well, this is a bit hackish. we store the socket of the last connected client … … 225 225 options.daemon = False 226 226 elif opt in ("-p", "--port"): 227 options.port = arg227 options.port = int(arg) 228 228 elif opt in ("-v", "--version"): 229 229 options.version = True … … 244 244 options.config.sslkey = options.config.get('skyped', 'key').split('#')[0] 245 245 options.config.sslcert = options.config.get('skyped', 'cert').split('#')[0] 246 # hack: we have to parse the parameters first to locate the 247 # config file but the -p option should overwrite the value from 248 # the config file 249 try: 250 options.config.port = int(options.config.get('skyped', 'port').split('#')[0]) 251 if not options.port: 252 options.port = options.config.port 253 except NoOptionError: 254 pass 255 if not options.port: 256 options.port = 2727 246 257 dprint("Parsing config file '%s' done, username is '%s'." % (options.cfgpath, options.config.username)) 247 258 if options.daemon: … … 256 267 print 'skyped is started on port %s, pid: %d' % (options.port, pid) 257 268 sys.exit(0) 269 else: 270 dprint('skyped is started on port %s' % options.port) 258 271 server(options.host, options.port) 259 272 try:
Note: See TracChangeset
for help on using the changeset viewer.