本文整理汇总了Python中pyanaconda.core.signal.Signal类的典型用法代码示例。如果您正苦于以下问题:Python Signal类的具体用法?Python Signal怎么用?Python Signal使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了Signal类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Python代码示例。
示例1: CheckResult
class CheckResult(object):
"""Result of an input check."""
def __init__(self):
self._success = False
self._error_message = ""
self.error_message_changed = Signal()
@property
def success(self):
return self._success
@success.setter
def success(self, value):
self._success = value
@property
def error_message(self):
"""Optional error message describing why the input is not valid.
:returns: why the input is bad (provided it is bad) or None
:rtype: str or None
"""
return self._error_message
@error_message.setter
def error_message(self, new_error_message):
self._error_message = new_error_message
self.error_message_changed.emit(new_error_message)
开发者ID:rvykydal,项目名称:anaconda,代码行数:29,代码来源:input_checking.py
示例2: __init__
def __init__(self):
self.module_properties_changed = Signal()
self.a_changed = Signal()
self.b_changed = Signal()
self._a = 1
self._b = 2
开发者ID:rvykydal,项目名称:anaconda,代码行数:7,代码来源:dbus_property_test.py
示例3: __init__
def __init__(self):
super().__init__()
self._firewall_module = FirewallModule()
self.hostname_changed = Signal()
self._hostname = "localhost.localdomain"
self.current_hostname_changed = Signal()
self._hostname_service_proxy = None
if conf.system.provides_system_bus:
self._hostname_service_proxy = HOSTNAME.get_proxy()
self._hostname_service_proxy.PropertiesChanged.connect(self._hostname_service_properties_changed)
self.connected_changed = Signal()
self.nm_client = None
# TODO fallback solution - use Gio/GNetworkMonitor ?
if SystemBus.check_connection():
nm_client = NM.Client.new(None)
if nm_client.get_nm_running():
self.nm_client = nm_client
self.nm_client.connect("notify::%s" % NM.CLIENT_STATE, self._nm_state_changed)
initial_state = self.nm_client.get_state()
self.set_connected(self._nm_state_connected(initial_state))
else:
log.debug("NetworkManager is not running.")
开发者ID:zhangsju,项目名称:anaconda,代码行数:27,代码来源:network.py
示例4: Test3Implementation
class Test3Implementation(object):
def __init__(self):
self.module_properties_changed = Signal()
self.a_changed = Signal()
self.b_changed = Signal()
self._a = 1
self._b = 2
@property
def a(self):
return self._a
def set_a(self, a):
self._a = a
self.a_changed.emit()
@property
def b(self):
return self._b
@b.setter
def b(self, b):
self._b = b
self.b_changed.emit()
def do_external_changes(self, a, b):
self.set_a(a)
self.b = b
def do_secret_changes(self, a, b):
self._a = a
self._b = b
开发者ID:rvykydal,项目名称:anaconda,代码行数:34,代码来源:dbus_property_test.py
示例5: __init__
def __init__(self):
"""Initialize the module."""
super().__init__()
self.bootloader_mode_changed = Signal()
self._bootloader_mode = BootloaderMode.ENABLED
self.bootloader_type_changed = Signal()
self._bootloader_type = BootloaderType.DEFAULT
self.preferred_location_changed = Signal()
self._preferred_location = BOOTLOADER_LOCATION_DEFAULT
self.drive_changed = Signal()
self._drive = ""
self.drive_order_changed = Signal()
self._drive_order = []
self.keep_mbr_changed = Signal()
self._keep_mbr = False
self.keep_boot_order_changed = Signal()
self._keep_boot_order = False
self.extra_arguments_changed = Signal()
self._extra_arguments = []
self.timeout_changed = Signal()
self._timeout = BOOTLOADER_TIMEOUT_UNSET
self.password_is_set_changed = Signal()
self._password = ""
self._password_is_encrypted = False
开发者ID:zhangsju,项目名称:anaconda,代码行数:34,代码来源:bootloader.py
示例6: __init__
def __init__(self, storage, payload):
"""Create a new Hub instance.
The arguments this base class accepts defines the API that Hubs
have to work with. A Hub does not get free reign over everything
in the anaconda class, as that would be a big mess. Instead, a
Hub may count on the following:
data -- An instance of a pykickstart Handler object. The
Hub uses this to populate its UI with defaults
and to pass results back after it has run. The data
property must be implemented by classes inheriting
from Hub.
storage -- An instance of storage.Storage. This is useful for
determining what storage devices are present and how
they are configured.
payload -- An instance of a payload.Payload subclass. This
is useful for displaying and selecting packages to
install, and in carrying out the actual installation.
"""
self._storage = storage
self.payload = payload
self.paths = {}
self._spokes = {}
# entry and exit signals
# - get the hub instance as a single argument
self.entered = Signal()
self.exited = Signal()
# connect the default callbacks
self.entered.connect(self.entry_logger)
self.exited.connect(self.exit_logger)
开发者ID:rvykydal,项目名称:anaconda,代码行数:34,代码来源:common.py
示例7: InputField
class InputField(object):
"""An input field containing data to be checked.
The input field can have an initial value that can be
monitored for change via signals.
"""
def __init__(self, initial_content):
self._initial_content = initial_content
self._content = initial_content
self.changed = Signal()
self._initial_change_signal_fired = False
self.changed_from_initial_state = Signal()
@property
def content(self):
return self._content
@content.setter
def content(self, new_content):
old_content = self._content
self._content = new_content
# check if the input changed from the initial state
if old_content != new_content:
self.changed.emit()
# also fire the changed-from-initial-state signal if required
if not self._initial_change_signal_fired and new_content != self._initial_content:
self.changed_from_initial_state.emit()
self._initial_change_signal_fired = True
开发者ID:rvykydal,项目名称:anaconda,代码行数:29,代码来源:input_checking.py
示例8: __init__
def __init__(self):
"""Initialize the module."""
super().__init__()
self.enabled_changed = Signal()
self._enabled = False
self.mount_points_changed = Signal()
self._mount_points = list()
开发者ID:rvykydal,项目名称:anaconda,代码行数:9,代码来源:manual.py
示例9: __init__
def __init__(self):
super().__init__()
self._password_score = 0
self.password_score_changed = Signal()
self._status_text = ""
self.status_text_changed = Signal()
self._password_quality = 0
self.password_quality_changed = Signal()
self._length_ok = False
self.length_ok_changed = Signal()
开发者ID:rvykydal,项目名称:anaconda,代码行数:10,代码来源:input_checking.py
示例10: __init__
def __init__(self):
super().__init__()
self.timezone_changed = Signal()
self._timezone = "America/New_York"
self.is_utc_changed = Signal()
self._is_utc = False
self.ntp_enabled_changed = Signal()
self._ntp_enabled = True
self.ntp_servers_changed = Signal()
self._ntp_servers = []
开发者ID:rvykydal,项目名称:anaconda,代码行数:13,代码来源:timezone.py
示例11: __init__
def __init__(self, message_bus, service_name):
"""Creates an DBus service observer.
:param message_bus: a message bus
:param service_name: a DBus name of a service
"""
self._message_bus = message_bus
self._service_name = service_name
self._is_service_available = False
self._service_available = Signal()
self._service_unavailable = Signal()
self._watched_id = None
开发者ID:zhangsju,项目名称:anaconda,代码行数:14,代码来源:observer.py
示例12: __init__
def __init__(self):
super().__init__()
self.selinux_changed = Signal()
self._selinux = SELinuxMode.DEFAULT
self.authselect_changed = Signal()
self._authselect_args = []
self.authconfig_changed = Signal()
self._authconfig_args = []
self.realm_changed = Signal()
self._realm = self.create_realm()
开发者ID:zhangsju,项目名称:anaconda,代码行数:14,代码来源:security.py
示例13: __init__
def __init__(self):
super().__init__()
self.language_changed = Signal()
self._language = ""
self.language_support_changed = Signal()
self._language_support = []
self.language_seen_changed = Signal()
self._language_seen = False
self.keyboard_changed = Signal()
self._keyboard = ""
self.vc_keymap_changed = Signal()
self._vc_keymap = ""
self.x_layouts_changed = Signal()
self._x_layouts = []
self.switch_options_changed = Signal()
self._switch_options = []
self.keyboard_seen_changed = Signal()
self._keyboard_seen = False
开发者ID:rvykydal,项目名称:anaconda,代码行数:25,代码来源:localization.py
示例14: __init__
def __init__(self):
super().__init__()
self.rootpw_seen_changed = Signal()
self._rootpw_seen = False
self.root_password_is_set_changed = Signal()
self._root_password_is_set = False
self._root_password = ""
self._root_password_is_crypted = False
self.root_account_locked_changed = Signal()
self._root_account_locked = False
self.users_changed = Signal()
self._users = {}
开发者ID:rvykydal,项目名称:anaconda,代码行数:15,代码来源:users.py
示例15: __init__
def __init__(self):
super().__init__()
self._progress_changed_signal = Signal()
self.__progress_lock = Lock()
self.__progress_step = 0
self.__progress_msg = ""
开发者ID:rvykydal,项目名称:anaconda,代码行数:7,代码来源:progress.py
示例16: __init__
def __init__(self):
self._lock = RLock()
self._modules = set()
self._all_modules_added = False
self.init_done = Signal()
self._init_done_triggered = False
self._added_module_count = 0
开发者ID:rvykydal,项目名称:anaconda,代码行数:7,代码来源:lifecycle.py
示例17: __init__
def __init__(self):
super().__init__()
self._storage = None
self.selected_disks_changed = Signal()
self._selected_disks = []
self.exclusive_disks_changed = Signal()
self._exclusive_disks = []
self.ignored_disks_changed = Signal()
self._ignored_disks = []
self.protected_devices_changed = Signal()
self._protected_devices = []
self.disk_images_changed = Signal()
self._disk_images = {}
开发者ID:rvykydal,项目名称:anaconda,代码行数:18,代码来源:selection.py
示例18: __init__
def __init__(self):
self._dasds = []
self._can_format_unformatted = True
self._can_format_ldl = True
self._report = Signal()
self._report.connect(log.debug)
self._last_message = ""
self._dasd_module = STORAGE.get_proxy(DASD)
开发者ID:zhangsju,项目名称:anaconda,代码行数:11,代码来源:format_dasd.py
示例19: __init__
def __init__(self):
super().__init__()
self.firewall_seen_changed = Signal()
self._firewall_seen = False
self.firewall_mode_changed = Signal()
self._firewall_mode = FirewallMode.DEFAULT
self.enabled_ports_changed = Signal()
self._enabled_ports = []
self.trusts_changed = Signal()
self._trusts = []
# services to allow
self.enabled_services_changed = Signal()
self._enabled_services = []
# services to explicitly disallow
self.disabled_services_changed = Signal()
self._disabled_services = []
self.use_system_defaults_changed = Signal()
self._use_system_defaults = False
开发者ID:rvykydal,项目名称:anaconda,代码行数:25,代码来源:firewall.py
示例20: __init__
def __init__(self):
super().__init__()
self._firewall_module = FirewallModule()
self.hostname_changed = Signal()
self._hostname = "localhost.localdomain"
self.current_hostname_changed = Signal()
self._hostname_service_proxy = None
if conf.system.provides_system_bus:
self._hostname_service_proxy = HOSTNAME.get_proxy()
self._hostname_service_proxy.PropertiesChanged.connect(self._hostname_service_properties_changed)
self.connected_changed = Signal()
self.nm_client = None
# TODO fallback solution - use Gio/GNetworkMonitor ?
if SystemBus.check_connection():
nm_client = NM.Client.new(None)
if nm_client.get_nm_running():
self.nm_client = nm_client
self.nm_client.connect("notify::%s" % NM.CLIENT_STATE, self._nm_state_changed)
initial_state = self.nm_client.get_state()
self.set_connected(self._nm_state_connected(initial_state))
else:
log.debug("NetworkManager is not running.")
self._original_network_data = []
self._onboot_yes_ifaces = []
self._device_configurations = None
self._use_device_configurations = False
self.configurations_changed = Signal()
self._default_device_specification = DEFAULT_DEVICE_SPECIFICATION
self._bootif = None
self._ifname_option_values = []
self._disable_ipv6 = False
self._apply_boot_options(flags.cmdline)
开发者ID:rvykydal,项目名称:anaconda,代码行数:39,代码来源:network.py
注:本文中的pyanaconda.core.signal.Signal类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论