Should pip be upgraded?


#1

You are using pip version 9.0.3, however version 19.0.3 is available.

You should consider upgrading via the 'pip install --upgrade pip' command.

Should I do this?


#2

Here:


#3

There's an issue regarding this, btw.


#4

@OutsourcedGuru Thanks for the issue pointer. I just added my two-cents worth.


#5

How's your plugin coming along? I've seen you on the forums and git issue pages, and am very glad to see you getting into plugin development!


#6

@FormerLurker Check it out! Feedback welcome!

https://github.com/b-morgan/OctoPrint-FanSpeedMirror


#7

Nice! Very nice for your first plugin in fact. Better than my first attempt.

I do have one bit of feedback. I nonticed that you seem to be using windows IO redirection in your system commands, so I looked the code a bit. I see that you are using os.system to execute the command. I believe this is similar to subprocess.popen when shell=true. This can be a security risk. It would be better to pass arguments into your script, then use those arguments within your scripts if you need them. This prevents one from executing arbitrary commands.

You might consider switching to subprocess.popen (with shell=false). You can get any errors or standard output within python using stdout and stderr like so:

subprocess.Popen(args, stdout=subprocess.PIPE, stderr=subprocess.PIPE)

Sarge might work too, but I haven't used that yet.

Once again, nice work!


#8

I seem to recall demoting my self._logger.info() calls to self._logger.debug() calls when I'm ready to go to production rather than just commenting them out. If an enduser later has troubles you could have them change the OctoPrint logging level and provide you more feedback from a distance. You just want to not log sensitive data, though.