Merge branch 'master' of github.com:google/grpc into go-auth-tests

pull/884/head
Donna Dionne 10 years ago
commit b878174a83
  1. 11
      src/node/ext/channel.cc
  2. 10
      src/python/README.md

@ -103,11 +103,15 @@ NAN_METHOD(Channel::New) {
grpc_channel *wrapped_channel;
// Owned by the Channel object
NanUtf8String *host = new NanUtf8String(args[0]);
NanUtf8String *host_override = NULL;
if (args[1]->IsUndefined()) {
wrapped_channel = grpc_channel_create(**host, NULL);
} else if (args[1]->IsObject()) {
grpc_credentials *creds = NULL;
Handle<Object> args_hash(args[1]->ToObject()->Clone());
if (args_hash->HasOwnProperty(NanNew(GRPC_SSL_TARGET_NAME_OVERRIDE_ARG))) {
host_override = new NanUtf8String(args_hash->Get(NanNew(GRPC_SSL_TARGET_NAME_OVERRIDE_ARG)));
}
if (args_hash->HasOwnProperty(NanNew("credentials"))) {
Handle<Value> creds_value = args_hash->Get(NanNew("credentials"));
if (!Credentials::HasInstance(creds_value)) {
@ -155,7 +159,12 @@ NAN_METHOD(Channel::New) {
} else {
return NanThrowTypeError("Channel expects a string and an object");
}
Channel *channel = new Channel(wrapped_channel, host);
Channel *channel;
if (host_override == NULL) {
channel = new Channel(wrapped_channel, host);
} else {
channel = new Channel(wrapped_channel, host_override);
}
channel->Wrap(args.This());
NanReturnValue(args.This());
} else {

@ -1,7 +1,7 @@
GRPC Python
gRPC Python
=========
The Python facility of GRPC.
The Python facility of gRPC.
Prerequisites
@ -13,8 +13,8 @@ Python 2.7, virtualenv, pip, libprotobuf-dev, and libprotoc-dev.
Building from source
----------------------
- Build the GRPC core
E.g, from the root of the grpc [git repo](https://github.com/google/grpc)
- Build the gRPC core from the root of the
[gRPC git repo](https://github.com/grpc/grpc)
```
$ make shared_c static_c
```
@ -28,7 +28,7 @@ $ tools/run_tests/build_python.sh
Testing
-----------------------
- Use run_python.sh to run GRPC as it was installed into the virtual environment
- Use run_python.sh to run gRPC as it was installed into the virtual environment
```
$ tools/run_tests/run_python.sh
```

Loading…
Cancel
Save