checking if a connect using ServerProxy fails

Discussion in 'Python' started by sashan, Oct 26, 2003.

  1. sashan

    sashan Guest

    Hi

    How do you test if a connect fails. I'm doing this at the moment:
    print 'Connect'
    try:
    self.sp = ServerProxy('http://localhost:5001')
    except Fault, f:
    print 'fail'

    but it doesn't fail. I don't have anything listening on port 5001.
    sashan, Oct 26, 2003
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Otis Mukinfus
    Replies:
    3
    Views:
    913
    Juan T. Llibre
    Jul 8, 2005
  2. Replies:
    3
    Views:
    40,221
    Roedy Green
    Nov 16, 2005
  3. dayo
    Replies:
    11
    Views:
    338
    Ilya Zakharevich
    Dec 16, 2005
  4. Replies:
    2
    Views:
    278
  5. Mohsen Pahlevanzadeh

    Qt connect and first connect or unicode

    Mohsen Pahlevanzadeh, Sep 17, 2013, in forum: Python
    Replies:
    3
    Views:
    152
    Mohsen Pahlevanzadeh
    Sep 18, 2013
Loading...

Share This Page