Skip to content

Commit

Permalink
Overzealous with the is not None stuff
Browse files Browse the repository at this point in the history
match returns '[]' when there aren't any and that is 'falsey'
  • Loading branch information
markwal committed May 6, 2020
1 parent 9593128 commit 834948e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion GPX
Submodule GPX updated 1 files
+0 −5 src/pymodule/gpxmodule.c
2 changes: 1 addition & 1 deletion octoprint_GPX/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ def serial_factory(self, comm, port, baudrate, timeout, *args, **kwargs):
try:
import glob
ports = glob.glob("/dev/serial/by-id/*MakerBot_Industries_The_Replicator*")
if ports is not None:
if ports:
port = os.path.normpath(os.path.join("/dev/serial/by-id/", os.readlink(ports[0])))
except:
# oh well, it was worth a try
Expand Down

0 comments on commit 834948e

Please sign in to comment.