HN2new | past | comments | ask | show | jobs | submitlogin

The app looks really nice visually, a few points though:

except Exception: pass

is generally considered to be a code smell. The problem being that when you're catching all exception information and throwing it away you will never know what went wrong and where. If you're doing a try/except Exception nested inside another except Exception then I would humbly suggest that you really need to think about refactoring and restructuring.

Also, anywhere that you see a repeating pattern, you might be better off wrapping it in a function or method rather than typing it out each time. For example in your __update__ method starting at about line 400 you've got pretty much the same code in two places with just a variable different between the two.



Besides upvoting for agreement with all the above (I didn't review the code but certainly all this is worth fixing if present), I'll also say that you probably shouldn't recommend people using `sudo` to install your thing in your README / landing page.


What is preferred?


Typically you just leave off the sudo and recommend people to just run pip install mything. That's the only thing required, unless you have a Python that has its `site-packages` directory in a place that isn't user writable, for which people who are in this situation are generally aware of the proper solution (which I'll mention in a sec anyhow).

You should essentially never use sudo to install any package, since even besides any security issues, it can clobber things on your system that are necessary for your OS (by say, upgrading a package that your OS ships with).

I happen to not use my system's shipped Python at all, since I'm on OSX, but if you are using it, you want to use `pip install --user mything`, no sudo necessary.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: