Fires if the machine is running Fedora.
161309
def report(rel):
    """"""

    if "Fedora" in rel.product:
        return make_pass("IS_FEDORA", product=rel.product)
    else:
        return make_fail("IS_NOT_FEDORA", product=rel.product)
991474
def run(self):
        ""
        self.addServices()
        self.catalogServers(self.hendrix)
        action = self.action
        fd = self.options['fd']

        if action.startswith('start'):
            chalk.blue(self._listening_message())
            getattr(self, action)(fd)

            ###########################
            # annnnd run the reactor! #
            ###########################
            try:
                self.reactor.run()
            finally:
                shutil.rmtree(PID_DIR, ignore_errors=True)  # cleanup tmp PID dir

        elif action == 'restart':
            getattr(self, action)(fd=fd)
        else:
            getattr(self, action)()
828682
def run(self):
        """"""
        try:
            self.linux.verify_system_status()
        except InstallSkipError:
            Log.info('Install skipped.')
            return

        work_dir = tempfile.mkdtemp(suffix='-rpm-py-installer')
        Log.info("Created working directory '{0}'".format(work_dir))

        with Cmd.pushd(work_dir):
            self.rpm_py.download_and_install()
            if not self.python.is_python_binding_installed():
                message = (
                    'RPM Python binding failed to install '
                    'with unknown reason.'
                )
                raise InstallError(message)

            # TODO: Print installed module name and version as INFO.

        if self.is_work_dir_removed:
            shutil.rmtree(work_dir)
            Log.info("Removed working directory '{0}'".format(work_dir))
        else:
            Log.info("Saved working directory '{0}'".format(work_dir))
1294531
def uri(self):
        " "
        use_pid = self.pid
        if callable(use_pid):
            use_pid = self.DUMMY_PID
        return 'info:fedora/' + use_pid
589712
def execute(self, array_id = None, machine_name = None):
    """"""
    self.status = 'executing'
    if array_id is not None:
      for array_job in self.array:
        if array_job.id == array_id:
          array_job.status = 'executing'
          if machine_name is not None:
            array_job.machine_name = machine_name
            array_job.start_time = datetime.now()
    elif machine_name is not None:
      self.machine_name = machine_name
    if self.start_time is None:
      self.start_time = datetime.now()

    # sometimes, the 'finish' command did not work for array jobs,
    # so check if any old job still has the 'executing' flag set
    for job in self.get_jobs_we_wait_for():
      if job.array and job.status == 'executing':
        job.finish(0, -1)
783870
def fire_exception(exc, opts, job=None, node='minion'):
    '''
    
    '''
    if job is None:
        job = {}
    event = salt.utils.event.SaltEvent(node, opts=opts, listen=False)
    event.fire_event(pack_exception(exc), '_salt_error')
385972
protected void firePressed(Command command) {
		getState(command).down = true;
		getState(command).pressed = true;

		if (!isActive()) {
			return;
		}

		for (int i = 0; i < listeners.size(); i++) {
			((InputProviderListener) listeners.get(i)).controlPressed(command);
		}
	}
863039
public static void fireFinalized(Run r) {
        if (Jenkins.getInstanceOrNull() == null) { // TODO use !Functions.isExtensionsAvailable() once JENKINS-33377
            return;
        }
        for (RunListener l : all()) {
            if(l.targetType.isInstance(r))
                try {
                    l.onFinalized(r);
                } catch (Throwable e) {
                    report(e);
                }
        }
    }
645182
@SuppressWarnings("unchecked")
    @Override
    public Boolean execute() {
        try {
            SmartFoxServer.getInstance()
                .getAPIManager().getBuddyApi()
                .goOnline(CommandUtil.getSfsUser(user, api), online, fireServerEvent);
        } catch (SFSBuddyListException e) {
            throw new IllegalStateException(e);
        }
        return Boolean.FALSE;
    }
205154
async def fire(self, evtname, **info):
        '''
        

        '''
        event = (evtname, info)
        if self.isfini:
            return event

        await self.dist(event)
        return event
166046
private void firePluginStarted(final Plugin plugin) {
        PluginEvent e = null;
        synchronized (listenerList) {
            for (Iterator iter = listenerList.iterator(); iter.hasNext();) {
                PluginListener l = (PluginListener) iter.next();
                if (e == null) {
                    e = new PluginEvent(plugin);
                }
                l.pluginStarted(e);
            }
        }
    }
1221284
private static void triggerGc(Integer pid) {
		VirtualMachine vm = null;
		try {
			vm = VirtualMachine.attach(String.valueOf(pid));
			HotSpotVirtualMachine hvm = (HotSpotVirtualMachine) vm;
			try (InputStream in = hvm.executeJCmd("GC.run");) {
				byte b[] = new byte[256];
				int n;
				do {
					n = in.read(b);
					if (n > 0) {
						String s = new String(b, 0, n, "UTF-8");
						tty.print(s);
					}
				} while (n > 0);
				tty.println();
			}
		} catch (Exception e) {
			tty.println(e.getMessage());
		} finally {
			if (vm != null) {
				try {
					vm.detach();
				} catch (IOException e) {
					tty.println(e.getMessage());
				}
			}
		}
	}
166913
function( context, args ) {
				if ( stack ) {
					if ( firing ) {
						if ( !flags.once ) {
							stack.push( [ context, args ] );
						}
					} else if ( !( flags.once && memory ) ) {
						fire( context, args );
					}
				}
				return this;
			}
813872
void fireEvent() {
        boolean useLock = !isReentrant();
        if (useLock) {
            lock.lock();
        }
        EventImpl event = eventQueue.poll();

        try {
            if (event != null) {
                fireEvent(event);
            }
        } finally {
            if (useLock) {
                lock.unlock();
            }
        }

    }
496959
def watch_firings(self, flag):
        """"""
        lib.EnvSetDefruleWatchFirings(self._env, int(flag), self._rule)
1076276
public T execute() {
        if (isWindows()) {
            return onWindows();
        } else if (isMac()) {
            return onMac();
        } else if (isUnix()) {
            return onUnix();
        } else if (isSolaris()) {
            return onSolaris();
        } else {
            throw new IllegalStateException("Invalid operating system " + os);
        }
    }
179425
def _run(self):
        """"""
        try:
            # Run the worker
            self.worker()
        except SystemExit as ex:
            # sys.exit() was called
            if isinstance(ex.code, int):
                if ex.code is not None and ex.code != 0:
                    # A custom exit code was specified
                    self._shutdown(
                        'Exiting with non-zero exit code {exitcode}'.format(
                            exitcode=ex.code),
                        ex.code)
            else:
                # A message was passed to sys.exit()
                self._shutdown(
                    'Exiting with message: {msg}'.format(msg=ex.code), 1)
        except Exception as ex:
            if self.detach:
                self._shutdown('Dying due to unhandled {cls}: {msg}'.format(
                    cls=ex.__class__.__name__, msg=str(ex)), 127)
            else:
                # We're not detached so just raise the exception
                raise

        self._shutdown('Shutting down normally')