X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=portal%2Fslicetabexperiment.py;h=f198e1589a7d8ac1e247179c5d7cba121e744f05;hb=a228a3f58b5be134ebd4085294da28618c55268e;hp=254b6765492b18183c3ff4d376cf026300c56c05;hpb=95fcc57dcf3c6d264dfe895a8d0255a489ee2c8c;p=myslice.git diff --git a/portal/slicetabexperiment.py b/portal/slicetabexperiment.py index 254b6765..f198e158 100644 --- a/portal/slicetabexperiment.py +++ b/portal/slicetabexperiment.py @@ -76,18 +76,19 @@ class ExperimentView (FreeAccessView, ThemeView): #get all iotlab users try: - userData = "Basic " + (ConfigEngine.default_iotlab_admin_user + ":" + ConfigEngine.default_iotlab_admin_password).encode("base64").rstrip() - req = urllib2.Request(ConfigEngine.default_iotlab_url) + engine = ConfigEngine() + userData = "Basic " + (engine.iotlab_admin_user() + ":" + engine.iotlab_admin_password()).encode("base64").rstrip() + req = urllib2.Request(engine.iotlab_url()) req.add_header('Accept', 'application/json') req.add_header("Content-type", "application/x-www-form-urlencoded") req.add_header('Authorization', userData) # make the request and print the results res = urllib2.urlopen(req) all_users = json.load(res) - except URLError as e: + except urllib2.URLError as e: print "There is a problem in getting iotlab users %s" % e.reason - #print all_users + all_users = list() #getting the login from email #initial value no-account == contact_admin