Skip to content

Commit

Permalink
Fix compatibility check thanks @ignaworn for spotting and reporting t…
Browse files Browse the repository at this point in the history
…his.

 Added description
 Incremented Version.
  • Loading branch information
Salandora authored and Salandora committed Dec 13, 2015
1 parent b55f81c commit 5ceddca
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 10 deletions.
11 changes: 3 additions & 8 deletions octoprint_filemanager/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ def _is_octoprint_compatible(compatibility_entries):
"""

octoprint_version = _get_octoprint_version()

for octo_compat in compatibility_entries:
if not any(octo_compat.startswith(c) for c in ("<", "<=", "!=", "==", ">=", ">", "~=", "===")):
octo_compat = ">={}".format(octo_compat)
Expand All @@ -35,14 +34,10 @@ def _is_octoprint_compatible(compatibility_entries):

return True

# copied from pluginmanager plugin
def _get_octoprint_version_string():
from octoprint._version import get_versions
return get_versions()["version"]

# copied from pluginmanager plugin
def _get_octoprint_version():
octoprint_version_string = _get_octoprint_version_string()
from octoprint.server import VERSION
octoprint_version_string = VERSION

if "-" in octoprint_version_string:
octoprint_version_string = octoprint_version_string[:octoprint_version_string.find("-")]
Expand All @@ -55,7 +50,7 @@ def _get_octoprint_version():
if part.startswith("*"):
break
base_version.append(part)
octoprint_version = tuple(base_version)
octoprint_version = ".".join(base_version)
else:
# new setuptools
octoprint_version = pkg_resources.parse_version(octoprint_version.base_version)
Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@
plugin_name = "OctoPrint-FileManager"

# The plugin's version. Can be overwritten within OctoPrint's internal data via __plugin_version__ in the plugin module
plugin_version = "0.1.0"
plugin_version = "0.1.1"

# The plugin's description. Can be overwritten within OctoPrint's internal data via __plugin_description__ in the plugin
# module
plugin_description = """TODO"""
plugin_description = "Simple FileManager"

# The plugin's author. Can be overwritten within OctoPrint's internal data via __plugin_author__ in the plugin module
plugin_author = "Marc Hannappel (Salandora)"
Expand Down

0 comments on commit 5ceddca

Please sign in to comment.