Skip to content

Commit

Permalink
Add python3 support
Browse files Browse the repository at this point in the history
  • Loading branch information
guysoft committed Aug 2, 2020
1 parent 1014e33 commit 14b14d6
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
1 change: 1 addition & 0 deletions octoprint_printhistory/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

from flask import jsonify, request, make_response
from octoprint.server.util.flask import with_revalidation_checking, check_etag
__plugin_pythoncompat__ = ">=2.7,<4"

import octoprint.plugin
import sqlite3
Expand Down
11 changes: 9 additions & 2 deletions octoprint_printhistory/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,15 @@
import json
import logging
import unittest
import StringIO
import ConfigParser

import sys
if sys.version_info >= (3,0):
import configparser
from io import StringIO
else:
import ConfigParser
import StringIO


VERSION_REGEX = re.compile(r"(\d+)?\.(\d+)?\.?(\*|\d+)")
BUFFER_SIZE = 8192
Expand Down

0 comments on commit 14b14d6

Please sign in to comment.