Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
python3-dmapi / usr / lib / python3 / dist-packages / dmapi / tests / uuidsentinel.py
Size: Mime:
# Copyright 2018 TrilioData Inc.
# All Rights Reserved.

import sys


class UUIDSentinels(object):
    def __init__(self):
        from oslo_utils import uuidutils
        self._uuid_module = uuidutils
        self._sentinels = {}

    def __getattr__(self, name):
        if name.startswith('_'):
            raise ValueError('Sentinels must not start with _')
        if name not in self._sentinels:
            self._sentinels[name] = self._uuid_module.generate_uuid()
        return self._sentinels[name]


sys.modules[__name__] = UUIDSentinels()