elgammal commited on
Commit
8e8790c
·
1 Parent(s): 2c098eb
Files changed (1) hide show
  1. playform.py +12 -8
playform.py CHANGED
@@ -24,14 +24,18 @@ playform_load = """
24
 
25
 
26
  def get_session_param(param):
27
- if isinstance(param,list):
28
- api_url=api_url_base+str(param[0]["id"])+api_url_tail
29
- token = param[0]["token"]
30
- token = token[4:]
31
- else:
32
- api_url = ""
33
- token = ""
34
-
 
 
 
 
35
  return api_url, token
36
 
37
  def prep_image(image):
 
24
 
25
 
26
  def get_session_param(param):
27
+
28
+ api_url = ""
29
+ token = ""
30
+
31
+ try:
32
+ if isinstance(param,list):
33
+ api_url=api_url_base+str(param[0]["id"])+api_url_tail
34
+ token = param[0]["token"]
35
+ #token = token[4:]
36
+ except:
37
+ pass
38
+
39
  return api_url, token
40
 
41
  def prep_image(image):