Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(712)

Unified Diff: mojo/public/python/mojo_bindings/descriptor.py

Issue 843523002: Delete empty mojo python package, and prefix all python packages with mojo_ (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « mojo/public/python/mojo_bindings/__init__.py ('k') | mojo/public/python/mojo_bindings/messaging.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/public/python/mojo_bindings/descriptor.py
diff --git a/mojo/public/python/mojo/bindings/descriptor.py b/mojo/public/python/mojo_bindings/descriptor.py
similarity index 98%
rename from mojo/public/python/mojo/bindings/descriptor.py
rename to mojo/public/python/mojo_bindings/descriptor.py
index 0df0bd606df25371e356c0022c202feee63ea0cf..45e073f5badd5630a89538cb6efef7728a2195fb 100644
--- a/mojo/public/python/mojo/bindings/descriptor.py
+++ b/mojo/public/python/mojo_bindings/descriptor.py
@@ -10,11 +10,11 @@ import array
import itertools
import struct
-import mojo.bindings.reflection as reflection
-import mojo.bindings.serialization as serialization
+import mojo_bindings.reflection as reflection
+import mojo_bindings.serialization as serialization
# pylint: disable=E0611,F0401
-import mojo.system
+import mojo_system
class Type(object):
@@ -240,7 +240,7 @@ class BaseHandleType(SerializableType):
if not self.nullable:
raise serialization.DeserializationException(
'Trying to deserialize null for non nullable type.')
- return self.FromHandle(mojo.system.Handle())
+ return self.FromHandle(mojo_system.Handle())
return self.FromHandle(context.ClaimHandle(value))
def FromHandle(self, handle):
@@ -255,8 +255,8 @@ class HandleType(BaseHandleType):
def Convert(self, value):
if value is None:
- return mojo.system.Handle()
- if not isinstance(value, mojo.system.Handle):
+ return mojo_system.Handle()
+ if not isinstance(value, mojo_system.Handle):
raise TypeError('%r is not a handle' % value)
return value
@@ -272,7 +272,7 @@ class InterfaceRequestType(BaseHandleType):
def Convert(self, value):
if value is None:
- return reflection.InterfaceRequest(mojo.system.Handle())
+ return reflection.InterfaceRequest(mojo_system.Handle())
if not isinstance(value, reflection.InterfaceRequest):
raise TypeError('%r is not an interface request' % value)
return value
@@ -310,10 +310,10 @@ class InterfaceType(BaseHandleType):
def ToHandle(self, value):
if not value:
- return mojo.system.Handle()
+ return mojo_system.Handle()
if isinstance(value, reflection.InterfaceProxy):
return value.manager.PassMessagePipe()
- pipe = mojo.system.MessagePipe()
+ pipe = mojo_system.MessagePipe()
self.interface.manager.Bind(value, pipe.handle0)
return pipe.handle1
« no previous file with comments | « mojo/public/python/mojo_bindings/__init__.py ('k') | mojo/public/python/mojo_bindings/messaging.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698