OLD | NEW |
| (Empty) |
1 # Copyright 2015 The Chromium Authors. All rights reserved. | |
2 # Use of this source code is governed by a BSD-style license that can be | |
3 # found in the LICENSE file. | |
4 | |
5 """ | |
6 This module sits in the place of mojo_system when mojo_system is not needed. | |
7 | |
8 This makes it possible to use mojom serialization/deserialization without | |
9 building mojo_system. | |
10 | |
11 In order to use this module, simply make sure it can be found on the python | |
12 path before loading any generated mojom modules. | |
13 """ | |
14 | |
15 import sys | |
16 | |
17 | |
18 class DummyMojoSystem(object): | |
19 def __getattr__(self, attr): | |
20 raise Exception("The dummy mojo_system does not support handles, interface " | |
21 "requests or message pipes.") | |
22 | |
23 | |
24 # Replaces this module with an instance of DummyMojoSystem. | |
25 sys.modules[__name__] = DummyMojoSystem() | |
OLD | NEW |