Mercurial > mamba
diff mamba/habitats/userlevelmenu.py @ 345:04bb1ffcd054
Activated ctpug level server.
author | Simon Cross <hodgestar@gmail.com> |
---|---|
date | Fri, 16 Sep 2011 23:00:25 +0200 |
parents | 5456db312f7f |
children | c2f7920563e4 |
line wrap: on
line diff
--- a/mamba/habitats/userlevelmenu.py Fri Sep 16 22:29:48 2011 +0200 +++ b/mamba/habitats/userlevelmenu.py Fri Sep 16 23:00:25 2011 +0200 @@ -2,19 +2,21 @@ from mamba.habitats.levelmenu import LevelMenu from mamba.level import Level +from mamba.constants import LEVEL_SERVER import urllib2 class UserLevelMenu(LevelMenu): - LEVEL_SERVER_URL = "http://localhost:5000/curated/" + LEVEL_SERVER_URL = LEVEL_SERVER + "curated/" TIMEOUT = 5.0 # in seconds CACHE = {} @classmethod def _url_data(cls, route): url = "%s%s" % (cls.LEVEL_SERVER_URL, route) + print url return urllib2.urlopen(url, timeout=cls.TIMEOUT).read() @classmethod