summaryrefslogtreecommitdiff
path: root/osprofiler/cmd
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2016-12-06 19:24:05 +0000
committerGerrit Code Review <review@openstack.org>2016-12-06 19:24:05 +0000
commit7df9306dd4ac9059f10a6b2cc0f53162de23eb20 (patch)
treefba360b6023aa9edd70889d4dc016a881655c475 /osprofiler/cmd
parent0fc3b5e2cf4f9c44f6f3c2562bd80d71a4241014 (diff)
parent291d8bd17bfc04be9274899a455e404538f65d51 (diff)
downloadosprofiler-7df9306dd4ac9059f10a6b2cc0f53162de23eb20.tar.gz
Merge "Use oslo_utils.uuidutils.is_uuid_like"
Diffstat (limited to 'osprofiler/cmd')
-rw-r--r--osprofiler/cmd/commands.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/osprofiler/cmd/commands.py b/osprofiler/cmd/commands.py
index 8b29c29..91d463a 100644
--- a/osprofiler/cmd/commands.py
+++ b/osprofiler/cmd/commands.py
@@ -16,6 +16,8 @@
import json
import os
+from oslo_utils import uuidutils
+
from osprofiler.cmd import cliutils
from osprofiler.drivers import base
from osprofiler import exc
@@ -49,7 +51,7 @@ class TraceCommands(BaseCommand):
trace = None
- if os.path.exists(args.trace):
+ if not uuidutils.is_uuid_like(args.trace):
trace = json.load(open(args.trace))
else:
try: