diff options
| -rwxr-xr-x | gist | 6 |
1 files changed, 3 insertions, 3 deletions
| @@ -135,11 +135,11 @@ http_method() { | |||
| 135 | || { echo "Error: no active internet connection" >&2; return 1; } | 135 | || { echo "Error: no active internet connection" >&2; return 1; } |
| 136 | } | 136 | } |
| 137 | 137 | ||
| 138 | httpGet(){ | 138 | httpGet() { |
| 139 | http_method GET "$@" | 139 | http_method GET "$@" |
| 140 | } | 140 | } |
| 141 | 141 | ||
| 142 | # Parse JSON from STDIN with string of commands | 142 | # Parse JSON from STDIN with string of python commands |
| 143 | _process_json() { | 143 | _process_json() { |
| 144 | PYTHONIOENCODING=utf-8 \ | 144 | PYTHONIOENCODING=utf-8 \ |
| 145 | python -c "from __future__ import print_function; import sys, json; $1" | 145 | python -c "from __future__ import print_function; import sys, json; $1" |
| @@ -676,7 +676,7 @@ _new_file() { | |||
| 676 | } | 676 | } |
| 677 | 677 | ||
| 678 | # Parse JSON object of a single gist | 678 | # Parse JSON object of a single gist |
| 679 | _gist_body(){ | 679 | _gist_body() { |
| 680 | _process_json " | 680 | _process_json " |
| 681 | import os.path | 681 | import os.path |
| 682 | files_json = {} | 682 | files_json = {} |