MCPcopy Index your code
hub / github.com/O365/python-o365 / __init__

Method __init__

O365/calendar.py:535–560  ·  view source on GitHub ↗

An event response status (status, time) :param parent: parent of this :type parent: Attendees or Event :param dict response_status: status info frm cloud

(self, parent, response_status)

Source from the content-addressed store, hash-verified

533 """ An event response status (status, time) """
534
535 def __init__(self, parent, response_status):
536 """ An event response status (status, time)
537
538 :param parent: parent of this
539 :type parent: Attendees or Event
540 :param dict response_status: status info frm cloud
541 """
542 super().__init__(protocol=parent.protocol,
543 main_resource=parent.main_resource)
544 self.status = response_status.get(self._cc('response'), 'none')
545 self.status = None if self.status == 'none' else EventResponse.from_value(self.status)
546 if self.status:
547 self.response_time = response_status.get(self._cc('time'), None)
548 if self.response_time == '0001-01-01T00:00:00Z':
549 # consider there's no response time
550 # this way we don't try to convert this Iso 8601 datetime to the
551 # local timezone which generated parse errors
552 self.response_time = None
553 if self.response_time:
554 try:
555 self.response_time = parse(self.response_time).astimezone(self.protocol.timezone)
556 except OverflowError:
557 log.debug(f"Couldn't parse event response time: {self.response_time}")
558 self.response_time = None
559 else:
560 self.response_time = None
561
562 def __repr__(self):
563 return self.status or 'None'

Callers

nothing calls this directly

Calls 4

_ccMethod · 0.80
from_valueMethod · 0.80
__init__Method · 0.45
getMethod · 0.45

Tested by

no test coverage detected