summaryrefslogtreecommitdiff
path: root/osprofiler/cmd
diff options
context:
space:
mode:
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: