Skip to content

Commit

Permalink
Handle the NoneType case as "AUTO"
Browse files Browse the repository at this point in the history
Should fix #10
  • Loading branch information
markwal committed Jun 16, 2018
1 parent b149c2b commit 0b5cef2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions octoprint_portlister/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,10 @@ def do_auto_connect(self, port, *args, **kwargs):
try:
self._logger.info("do_auto_connect")
(autoport, baudrate) = self._settings.global_get(["serial", "port"]), self._settings.global_get_int(["serial", "baudrate"])
if not autoport:
autoport = "AUTO"
if not port:
port = "AUTO"
if autoport == "AUTO" or os.path.realpath(autoport) == os.path.realpath(port):
self._logger.info("realpath match")
printer_profile = self._printer_profile_manager.get_default()
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
plugin_identifier = "portlister"
plugin_package = "octoprint_portlister"
plugin_name = "OctoPrint-PortLister"
plugin_version = "0.1.7"
plugin_version = "0.1.8"
plugin_description = """PortLister notices when printers get turned on and tells the list of ports to refresh"""
plugin_author = "Mark Walker"
plugin_author_email = "[email protected]"
Expand Down

0 comments on commit 0b5cef2

Please sign in to comment.