summaryrefslogtreecommitdiff
path: root/src/server/rz_api_common.py
diff options
context:
space:
mode:
authorLV-426 <lv-426@taproot.org.il>2015-04-13 23:40:49 +0300
committerLV-426 <lv-426@taproot.org.il>2015-04-14 00:03:53 +0300
commit936da20008deaa27abad1acda74b5edf0b069dfb (patch)
tree4306dcc149a65d551a0533b5cced4334e3004bd2 /src/server/rz_api_common.py
parentdf35a6ee85f19464bf090b3c972f261d7351b15e (diff)
rz_api_common: misc
Diffstat (limited to 'src/server/rz_api_common.py')
-rw-r--r--src/server/rz_api_common.py11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/server/rz_api_common.py b/src/server/rz_api_common.py
index 343d5b42..63954dc3 100644
--- a/src/server/rz_api_common.py
+++ b/src/server/rz_api_common.py
@@ -7,17 +7,16 @@ Common public API logic:
- validae_object__XXX: concerned with validating the logical state of an object
"""
-import logging
from flask import current_app
-from rz_kernel import RZDoc_Exception__not_found
+import logging
log = logging.getLogger('rhizi')
-class API_Exception__bad_request(Exception): # raised by input sanitation functions
+class API_Exception__bad_request(Exception): # raised by input sanitation functions
- def __init__(self, internal_err_msg, caller_err_msg = None):
+ def __init__(self, internal_err_msg, caller_err_msg=None):
super(API_Exception__bad_request, self).__init__(internal_err_msg)
- self.caller_err_msg = None # may be set to carry short string error messages which may be presented to the caller
+ self.caller_err_msg = None # may be set to carry short string error messages which may be presented to the caller
def __sanitize_input(*args, **kw_args):
pass
@@ -55,7 +54,7 @@ def sanitize_input__rzdoc_name(rzdoc_name_raw):
"""
sanitize rzdoc name raw input
"""
- rzdoc_name = rzdoc_name_raw.strip() # make sure we ommit trailing white spaces from doc name
+ rzdoc_name = rzdoc_name_raw.strip() # make sure we ommit trailing white spaces from doc name
if None == rzdoc_name or 0 == len(rzdoc_name):
raise API_Exception__bad_request('rzdoc: open request: empty doc name')