SeattleTestbed / repy_v1

Seattle Testbed's original Repy version 1 sandbox
MIT License
1 stars 4 forks source link

Inconsistent exceptions in advertise_announce() #110

Closed choksi81 closed 10 years ago

choksi81 commented 10 years ago

I suspect there is a bug with advertise_announce. Here are my observations.

When I did the following within the Python interactive shell, everything worked.

>>> import repyhelper
>>> repyhelper.translate_and_import("advertise.repy")
>>> advertise_announce('hahaha', '1234', 120)

But when I put them into a file (advert_test.repy) like this:

include advertise.repy
advertise_announce('hahaha', '1234', 120)

I got the following exceptions when running the script:

Uncaught exception! Following is a full traceback, and a user traceback.
The user traceback excludes non-user modules. The most recent call is displayed last.

Full debugging traceback:
  "repy.py", line 203, in main
  "/tmp/seattle/virtual_namespace.py", line 116, in evaluate
  "/tmp/seattle/safe.py", line 332, in safe_run
  "out.advert_test.repy", line 5018, in <module>
  "out.advert_test.repy", line 4904, in advertise_announce

User traceback:
  "out.advert_test.repy", line 5018, in <module>
  "out.advert_test.repy", line 4904, in advertise_announce

Exception (with class '.AdvertiseError'): [error (type: DOR): Function 'openconn' called with incorrect arguments.  Arguments were args:('geni.doregistry.org', 80, None, None, None), kwargs:{}"]("announce)
choksi81 commented 10 years ago

Author: justinc This is due to _DORadvertise_command passing a timeout of None into the httplibrary.

I've fixed this problem in r4041.