X-Git-Url: https://osm.etsi.org/gitweb/?p=osm%2FNBI.git;a=blobdiff_plain;f=osm_nbi%2Fnbi.py;h=ff8cd11bd8ab122b42f2825fa5e47bd6adb51516;hp=a0229c8aee7fe0587172fdb0d92a2f59a1dd25e6;hb=e128118419c3bb413de4cff8445b9b6c5598a5ed;hpb=0e96a88ce78692b6e4dc4f5a43ade2ccf7fca195 diff --git a/osm_nbi/nbi.py b/osm_nbi/nbi.py index a0229c8..ff8cd11 100644 --- a/osm_nbi/nbi.py +++ b/osm_nbi/nbi.py @@ -257,7 +257,7 @@ class Server(object): try: user_passwd = standard_b64decode(user_passwd64).decode() user, _, passwd = user_passwd.partition(":") - except: + except Exception: pass outdata = self.engine.new_token(None, {"username": user, "password": passwd}) token = outdata["id"] @@ -323,15 +323,15 @@ class Server(object): elif format_yaml: try: kwargs[k] = yaml.load(v) - except: + except Exception: pass elif k.endswith(".gt") or k.endswith(".lt") or k.endswith(".gte") or k.endswith(".lte"): try: kwargs[k] = int(v) - except: + except Exception: try: kwargs[k] = float(v) - except: + except Exception: pass elif v.find(",") > 0: kwargs[k] = v.split(",") @@ -342,7 +342,7 @@ class Server(object): elif format_yaml: try: v[index] = yaml.load(v[index]) - except: + except Exception: pass return indata @@ -449,7 +449,7 @@ class Server(object): elif method == "POST": try: session = self._authorization() - except: + except Exception: session = None if kwargs: indata.update(kwargs) @@ -488,7 +488,7 @@ class Server(object): thread_info = None if args and args[0] == "help": return "
\ninit\nfile/  download file\ndb-clear/table\nprune\nlogin\nlogin2\n"\
-                    "sleep/
" + "sleep/