From ca5d75e0528c684b4ea11ab7fc1227631c25fcba Mon Sep 17 00:00:00 2001 From: Tony Mack Date: Tue, 16 Dec 2008 03:09:24 +0000 Subject: [PATCH] in get_authority, return the hrn as is if it is only 1 level deep --- util/misc.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/util/misc.py b/util/misc.py index 90c257b4..b2e2b8ea 100644 --- a/util/misc.py +++ b/util/misc.py @@ -5,8 +5,10 @@ def get_leaf(hrn): return ".".join(parts[-1:]) def get_authority(hrn): - parts = hrn.split(".") - return ".".join(parts[:-1]) + parts = hrn.split(".") + if len(parts) > 1: + return ".".join(parts[:-1]) + return hrn def get_auth_type(type): if (type=="slice") or (type=="user") or (type=="sa"): -- 2.47.0