Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
new_event = Event.fromString(
text,
locale=self._conf['locale'],
href=event.href,
calendar=event.calendar,
etag=event.etag,
)
self.pane.collection.update(new_event)
update_colors(
new_event.start_local,
new_event.end_local,
(event.recurring or new_event.recurring)
)
else:
self.editor = True
editor = EventEditor(self.pane, event, update_colors, always_save=always_save)
ContainerWidget = linebox[self.pane._conf['view']['frame']]
new_pane = urwid.Columns([
('weight', 2, ContainerWidget(editor)),
('weight', 1, ContainerWidget(self.dlistbox))
], dividechars=2, focus_column=0)
new_pane.title = editor.title
def teardown(data):
self.editor = False
self.pane.window.open(new_pane, callback=teardown)
new_event = Event.fromString(
text,
locale=self._conf['locale'],
href=event.href,
calendar=event.calendar,
etag=event.etag,
)
self.pane.collection.update(new_event)
update_colors(
new_event.start_local,
new_event.end_local,
(event.recurring or new_event.recurring)
)
else:
self.editor = True
editor = EventEditor(self.pane, event, update_colors, always_save=always_save)
ContainerWidget = linebox[self.pane._conf['view']['frame']]
new_pane = urwid.Columns([
('weight', 2, ContainerWidget(editor)),
('weight', 1, ContainerWidget(self.dlistbox))
], dividechars=2, focus_column=0)
new_pane.title = editor.title
def teardown(data):
self.editor = False
self.pane.window.open(new_pane, callback=teardown)