From dec6f4b1f6013b420415ef6290fc2e6151dbfb4f Mon Sep 17 00:00:00 2001 From: richtier Date: Tue, 17 Jul 2018 22:36:13 +0100 Subject: [PATCH] Fix serve.py running --- README.md | 2 +- serve.py => avs_client/refreshtoken/serve.py | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) rename serve.py => avs_client/refreshtoken/serve.py (86%) mode change 100644 => 100755 diff --git a/README.md b/README.md index 590effd..941b5d0 100644 --- a/README.md +++ b/README.md @@ -105,7 +105,7 @@ To enable this first go [here](https://developer.amazon.com/avs/home.html#/avs/h Then run: ```sh -python ./serve.py \ +python ./avs_client/refreshtoken/serve.py \ --device-type-id=enter-device-type-id-here \ --client-id=enter-client-id-here \ --client-secret=enter-client-secret-here diff --git a/serve.py b/avs_client/refreshtoken/serve.py old mode 100644 new mode 100755 similarity index 86% rename from serve.py rename to avs_client/refreshtoken/serve.py index 20e9e57..0e3a9ea --- a/serve.py +++ b/avs_client/refreshtoken/serve.py @@ -1,4 +1,10 @@ -from avs_client.refreshtoken import arg_parser, http_server, handlers +import os +import sys + +# solve import error when calling this script from project root. +sys.path.append(os.getcwd()) + +from avs_client.refreshtoken import arg_parser, http_server, handlers # NOQA def serve_forever(address, port, client_id, client_secret, device_type_id):