You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Added setup.py MANIFEST.in
Added more things to do in TODO.md
Refactored gifc to handle more exceptions
In update api, change description and file arguements can be used independently
Removed the need for config.yml file. Now we extract data from environment variables
Create now uses whatever editor you mention amongst [nano, vi, gedit]
remove files recognizes when you pass files that are not present
Copy file name to clipboardExpand all lines: TODO.md
+19Lines changed: 19 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -136,7 +136,26 @@ else:
136
136
print('Creating gist failed')
137
137
```
138
138
9.-[ ] Get method doesn't work for private gists. May have to use [OAuth](https://developer.github.com/apps/building-oauth-apps/authorizing-oauth-apps/) for that.
139
+
11.-[ ] Requests raises exceptions inherited from RequestException that you are not catching. So commands like `r = request.post(....)` can fail on bad internet connections or because other random issues. Catch them like -
140
+
```python
141
+
except requests.exceptions.RequestException as e: # This is the correct syntax
142
+
print e
143
+
```
144
+
OR
145
+
```python
146
+
except requests.exceptions.Timeout:
147
+
# Maybe set up for a retry, or continue in a retry loop
148
+
except requests.exceptions.TooManyRedirects:
149
+
# Tell the user their URL was bad and try a different one
150
+
except requests.exceptions.RequestException as e:
151
+
# catastrophic error. bail.
152
+
print e
153
+
```
154
+
12. Handle FileNotFoundErrorin creating of gists via file parameter.
139
155
10. Instead of using `__file__`asin`foo_config = open(os.path.join(os.path.dirname(__file__),'foo.conf').read()` or ```cwd= os.path.dirname(os.path.abspath(__file__))```, use `pkg_resources` instead. [Help1](http://peak.telecommunity.com/DevCenter/PythonEggs#accessing-package-resources), [Help2](https://setuptools.readthedocs.io/en/latest/pkg_resources.html#resourcemanager-api)
156
+
13. Displaying gists in cli
157
+
14. Update is still hardcoded with`nano`. Can we open it in system default editor?
158
+
15. If no file arguement and description is given in update then open the first filein that gist in interactive mode for editing ?
140
159
## It is NOT meant to replace the GUI neither does it attempt to.
0 commit comments