diff options
| author | Sacheendra talluri <sacheendra.t@gmail.com> | 2017-04-04 15:34:01 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-04-04 15:34:01 +0200 |
| commit | 693a23d17c8783e51a97fd5a2439b5d1ceaa003c (patch) | |
| tree | fdad42c44a147e03101925ffd4d62a869bac4490 /opendc/util/rest.py | |
| parent | 59b05ac8425e34cdf41179506cdda357c59b4b12 (diff) | |
| parent | fd0376c5a8f018457a11bb0f9602bda366571955 (diff) | |
Merge pull request #6 from atlarge-research/api-over-http
Access API over HTTP
Diffstat (limited to 'opendc/util/rest.py')
| -rw-r--r-- | opendc/util/rest.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/opendc/util/rest.py b/opendc/util/rest.py index 65747762..ad53f084 100644 --- a/opendc/util/rest.py +++ b/opendc/util/rest.py @@ -13,11 +13,14 @@ with open(sys.argv[1]) as file: class Request(object): """WebSocket message to REST request mapping.""" - def __init__(self, message): + def __init__(self, message=None): """"Initialize a Request from a socket message.""" # Get the Request parameters from the message + if message is None: + return + try: self.message = message |
