Skip to content

Missing metadata should not break the parser #95

@fabi1cazenave

Description

@fabi1cazenave

Trying to load this layout: https://github.com/Nuclear-Squid/ergol/blob/master/layouts/bepo.yaml

$ kalamine  watch bepo.yaml                                                                                                                       [± pr]

Server started: http://localhost:1664
Hit Ctrl-C to stop.
[I 240208 14:43:38 server:335] Serving on http://localhost:5500
[I 240208 14:43:38 handlers:62] Start watching changes
[I 240208 14:43:38 handlers:64] Start detecting changes
127.0.0.1 - - [08/Feb/2024 14:43:38] "GET / HTTP/1.1" 200 -
----------------------------------------
Exception occurred during processing of request from ('127.0.0.1', 46484)
Traceback (most recent call last):
  File "/usr/lib/python3.10/socketserver.py", line 316, in _handle_request_noblock
    self.process_request(request, client_address)
  File "/usr/lib/python3.10/socketserver.py", line 347, in process_request
    self.finish_request(request, client_address)
  File "/usr/lib/python3.10/socketserver.py", line 360, in finish_request
    self.RequestHandlerClass(request, client_address, self)
  File "/home/kaze/www/kbd/kalamine/kalamine/server.py", line 65, in __init__
    super().__init__(*args, **kwargs)
  File "/usr/lib/python3.10/http/server.py", line 668, in __init__
    super().__init__(*args, **kwargs)
  File "/usr/lib/python3.10/socketserver.py", line 747, in __init__
    self.handle()
  File "/usr/lib/python3.10/http/server.py", line 433, in handle
    self.handle_one_request()
  File "/usr/lib/python3.10/http/server.py", line 421, in handle_one_request
    method()
  File "/home/kaze/www/kbd/kalamine/kalamine/server.py", line 93, in do_GET
    send(main_page(kb_layout), content="text/html")
  File "/home/kaze/www/kbd/kalamine/kalamine/server.py", line 37, in main_page
    <br /> {layout.meta['locale']}/{layout.meta['variant']}
KeyError: 'locale'

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions