def __init__(self, lock_dir):
    if (not os.path.exists(lock_dir)):
        makedirs(lock_dir)
    self.file_name = os.path.join(lock_dir, 'webports.lock')
    self.fd = open(self.file_name, 'w')
def __init__(self, lock_dir):
    if (not os.path.exists(lock_dir)):
        makedirs(lock_dir)
    self.file_name = os.path.join(lock_dir, 'webports.lock')
    self.fd = open(self.file_name, 'w')