Package: python-icalendar / 4.0.3-4

0002-icalendar.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
Fix error in cli.py view:

$ python3 -m icalendar.cli view /tmp/test.ics
Traceback (most recent call last):
  File "/usr/lib/python3.7/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/usr/lib/python3.7/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/usr/lib/python3/dist-packages/icalendar/cli.py", line 111, in <module>
    main()
  File "/usr/lib/python3/dist-packages/icalendar/cli.py", line 104, in main
    args.func(**{k: v for k, v in vars(args).items()
  File "/usr/lib/python3/dist-packages/icalendar/cli.py", line 74, in view
    description=event.get('description', '')).encode('utf-8'))
TypeError: write() argument must be str, not bytes

--- a/src/icalendar/cli.py
+++ b/src/icalendar/cli.py
@@ -71,7 +71,7 @@ def view(input_handle, output_handle):
             time_to=datetime.strftime(event.get('dtend').dt, '%H:%M'),
             location=event.get('location', ''),
             comment=event.get('comment', ''),
-            description=event.get('description', '')).encode('utf-8'))
+            description=event.get('description', '')))
 
 
 def main():