2 # ============LICENSE_START===================================================
3 # Copyright (c) 2018 Amdocs. All rights reserved.
4 # ===================================================================
5 # Licensed under the Apache License, Version 2.0 (the "License"); you may not
6 # use this file except in compliance with the License. You may obtain a copy
9 # http://www.apache.org/licenses/LICENSE-2.0
11 # Unless required by applicable law or agreed to in writing, software
12 # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
13 # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
14 # License for the specific language governing permissions and limitations under
16 # ============LICENSE_END====================================================
23 def make_template_name(user, template_name):
24 return "{}.{}".format(user, template_name)
28 def __init__(self, *args):
29 self._lockobj = threading.Lock()
30 dict.__init__(self, args)
32 def __getitem__(self, key):
34 self._lockobj.acquire()
35 val = dict.__getitem__(self, key)
39 self._lockobj.release()
41 def __setitem__(self, key, value):
43 self._lockobj.acquire()
44 dict.__setitem__(self, key, value)
48 self._lockobj.release()