aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--keystone-moon/keystone/contrib/moon/backends/flat.py6
-rw-r--r--keystone-moon/keystone/contrib/moon/controllers.py2
2 files changed, 5 insertions, 3 deletions
diff --git a/keystone-moon/keystone/contrib/moon/backends/flat.py b/keystone-moon/keystone/contrib/moon/backends/flat.py
index 83ed2a08..47c5529a 100644
--- a/keystone-moon/keystone/contrib/moon/backends/flat.py
+++ b/keystone-moon/keystone/contrib/moon/backends/flat.py
@@ -70,7 +70,8 @@ class LogConnector(LogDriver):
if filter_str:
_logs = filter(lambda x: filter_str in x, _logs)
if time_from:
- time_from = time.strptime(time_from.split(" ")[0], self.TIME_FORMAT)
+ if type(time_from) is basestring:
+ time_from = time.strptime(time_from.split(" ")[0], self.TIME_FORMAT)
try:
__logs = []
for log in _logs:
@@ -82,7 +83,8 @@ class LogConnector(LogDriver):
self.error("Time format error")
if time_to:
try:
- time_to = time.strptime(time_to.split(" ")[0], self.TIME_FORMAT)
+ if type(time_to) is basestring:
+ time_to = time.strptime(time_to.split(" ")[0], self.TIME_FORMAT)
__logs = []
for log in _logs:
_log = time.strptime(log.split(" ")[0], self.TIME_FORMAT)
diff --git a/keystone-moon/keystone/contrib/moon/controllers.py b/keystone-moon/keystone/contrib/moon/controllers.py
index 84e27fa3..1d9b2725 100644
--- a/keystone-moon/keystone/contrib/moon/controllers.py
+++ b/keystone-moon/keystone/contrib/moon/controllers.py
@@ -820,7 +820,7 @@ class Logs(controller.V3Controller):
def __init__(self):
super(Logs, self).__init__()
- def _get_user_from_token(self, token_id):
+ def _get_user_id_from_token(self, token_id):
response = self.token_provider_api.validate_token(token_id)
token_ref = token_model.KeystoneToken(token_id=token_id, token_data=response)
return token_ref['user']