Return the current status.
557319
def handle_request(path):
    
    accept = bottle.request.get_header("accept", default="text/plain")

    bottle.response.status = 200

    try:
        if "text/html" in accept:
            ret = CURRENT_STATE.as_html(path=path)
            bottle.response.content_type = "text/html"

        elif "application/json" in accept:
            ret = CURRENT_STATE.as_json(path=path)
            bottle.response.content_type = "application/json"

        elif "text/" in accept or "*/*" in accept:
            ret = CURRENT_STATE.as_json(path=path, with_indent=True)
            bottle.response.content_type = "text/plain"

        else:
            bottle.response.status = 407
            ret = "Cannot render data in acceptable content type"
    except StateError:
        bottle.response.status = 404
        ret = "Requested state component not found"

    return ret
728439
def get_status(self):
        
        url = self.base_url + '/status'
        try:
            r = requests.get(url, timeout=10)
            return r.json()
        except RequestException as err:
            raise Client.ClientError(err)
53315
function statusObject()
    {
        if ( $this->Status === null )
        {
            $this->Status = eZOrderStatus::fetchByStatus( $this->StatusID );
        }
        return $this->Status;
    }
622296
public function getStatus()
    {
        switch (strtolower($this->request->status)) {
            case 'success':
                return self::STATUS_COMPLETED;

            case 'pending':
                return self::STATUS_PENDING;

            case 'failure':
                return self::STATUS_FAILED;

            default:
                return self::STATUS_FAILED;
        }
    }
920429
protected function currentStatus()
    {
        if (! $masters = app(MasterSupervisorRepository::class)->all()) {
            return 'inactive';
        }

        return collect($masters)->contains(function ($master) {
            return $master->status === 'paused';
        }) ? 'paused' : 'running';
    }
689349
def status(self):
        
        status = _HTTP_STATUS_LINES.get(self._status_code)
        return str(status or ('{} Unknown'.format(self._status_code)))
412822
def get_status(self, statusid):

        

        response = self._req('/user/statuses/{}'.format(statusid))

        s = Status()
        s.from_dict(response)

        return s
388778
def get_status(self):
        
        if self.status is not None:
            return self.status
        if self.subsection == "dmdSec":
            if self.older is None:
                return "original"
            else:
                return "updated"
        if self.subsection in ("techMD", "rightsMD"):
            # TODO how to handle ones where newer has been deleted?
            if self.newer is None:
                return "current"
            else:
                return "superseded"
        return None
1296985
def status(self):
        
        myNow = timezone.localtime(timezone=self.tz)
        if getAwareDatetime(self.date, self.time_to, self.tz) < myNow:
            return "finished"
        elif getAwareDatetime(self.date, self.time_from, self.tz) < myNow:
            return "started"
88397
def get_status
      status = @http.aget(PredictionIO::AsyncRequest.new('/')).get
      begin
        status.body
      rescue
        status
      end
    end
447995
def status(self, status_id, raise_exception_on_failure=False):
        """"""
        query = {"output": "json", "user_credentials": self.api_key}

        resp = requests.get(
            "%sstatus/%s" % (self._url, status_id), params=query, timeout=self._timeout
        )

        if raise_exception_on_failure and resp.status_code != 200:
            raise DocumentStatusFailure(resp.content, resp.status_code)

        if resp.status_code == 200:
            as_json = json.loads(resp.content)
            if as_json["status"] == "completed":
                as_json["download_key"] = _get_download_key(as_json["download_url"])
            return as_json
        return resp
1035051
async def status_by_state(self, state: str) -> dict:
        """"""
        data = await self.raw_cdc_data()

        try:
            info = next((v for k, v in data.items() if state in k))
        except StopIteration:
            return {}

        return adjust_status(info)
991514
def get_current_status(self):
        """"""
        url = get_url("/remote/status.json")
        params = {"oauth": self._oauth_token, "csrf": self._csrf_token}
        r = self._request(url=url, params=params)
        return r.json()
1118019
def getStatus(self) :
        """"""
        if self.status == CONST.COLLECTION_LOADING_STATUS :
            return "loading"
        elif self.status == CONST.COLLECTION_LOADED_STATUS :
            return "loaded"
        elif self.status == CONST.COLLECTION_DELETED_STATUS :
            return "deleted"
        elif self.status == CONST.COLLECTION_UNLOADED_STATUS :
            return "unloaded"
        elif self.status == CONST.COLLECTION_NEWBORN_STATUS :
            return "newborn"
        else :
            raise ValueError("The collection has an Unknown status %s" % self.status)
640455
def status(self):
        """"""
        result = set()
        for line in self._execute('svn stat')[1].splitlines():
            if line[0] == '?':
                result.add((FileStatus.Added, line[2:].strip()))
            elif line[0] == '!':
                result.add((FileStatus.Removed, line[2:].strip()))
        return result
1047960
def get_status(self):
        
        headers, data = self._requester.requestJsonAndCheck(
            "GET",
            self.url,
            headers={
                "Accept": Consts.mediaTypeMigrationPreview
            }
        )
        self._useAttributes(data)
        return self.state
1090637
def get_status(with_version=False):
    """"""
    client = get_status_api()

    with catch_raise_api_exception():
        data, _, headers = client.status_check_basic_with_http_info()

    ratelimits.maybe_rate_limit(client, headers)

    if with_version:
        return data.detail, data.version

    return data.detail