From ad6f3a3ee2316b6cd4755391c9ab33b8462ff88d Mon Sep 17 00:00:00 2001 From: =?utf8?q?Bar=C4=B1=C5=9F=20Metin?= Date: Tue, 5 Oct 2010 16:52:20 +0200 Subject: [PATCH] string replace doesn't modify the string in-place --- sfa/util/namespace.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sfa/util/namespace.py b/sfa/util/namespace.py index fcc65ba4..b920f00d 100644 --- a/sfa/util/namespace.py +++ b/sfa/util/namespace.py @@ -20,21 +20,21 @@ def hrn_to_pl_slicename(hrn): # remove any escaped no alpah numeric characters #hrn = re.sub('\\\[^a-zA-Z0-9]', '', hrn) # remove any escaped '.' (i.e. '\.') - hrn.replace('\\.', '') + hrn = hrn.replace('\\.', '') parts = hrn.split(".") return parts[-2] + "_" + parts[-1] # assuming hrn is the hrn of an authority, return the plc authority name def hrn_to_pl_authname(hrn): # remove any escaped '.' (i.e. '\.') - hrn.replace('\\.', '') + hrn = hrn.replace('\\.', '') parts = hrn.split(".") return parts[-1] # assuming hrn is the hrn of an authority, return the plc login_base def hrn_to_pl_login_base(hrn): # remove any escaped '.' (i.e. '\.') - hrn.replace('\\.', '') + hrn = hrn.replace('\\.', '') return hrn_to_pl_authname(hrn) def hostname_to_hrn(auth_hrn, login_base, hostname): -- 2.43.0