Learn more about these different git repos.
Other Git URLs
b9d9390
@@ -11,3 +11,4 @@
datanommer.models
psycopg2
gunicorn
+ pytz
Wow! Were those the only things that needed to be changed?
@ralph i guess so, because the baseurl was redefined in the next mention. The error that was being returned is gone now though.
This shouldn't have been committed, I think (like we talked about in IRC). We want to keep that key='updates' argument in there because it hides the widget entirely when there are no 'updates'' in the result returned from data(...).
key='updates'
'updates''
data(...)
Looks like this shouldn't have been committed.
So, this technically works but is pretty fragile. nvr here isn't actually the nvr string itself, but is instead a dict that looks like {"nvr": "some string"}.
nvr
{"nvr": "some string"}
Accessing nvr.items()[0][1] is kind of odd. It works because nvr is a dict with only one key/value pair in it. But, if more information was passed in, nvr.items() would return its items in a random order... so you're not guaranteed that the [0] one will be the one you want.
nvr.items()[0][1]
nvr.items()
[0]
The nice thing about a dict is that you access its values by name, so, we should do that. It's much more clear to the reader (and readability counts!)
I suggest reworking this starting up further in the code so that:
build = update['builds'][0] nvr = build['nvr'] # etc...
Thanks for this @devyani7. Merging!