♻️ Migrate code base to Python 3 only
* pyupgrade
* various new codemods
* manual removal of Py2/3 compat imports
* manual adjustment of docs, examples, tests
* to_str is now the new to_unicode, deprecated
redirection to to_bytes has been removed
* to_native_str has been redirected to point to
to_str
* to_unicode has been redirected to point to
to_str
* atomic_write refactored to use
NamedTemporaryDirectory
* various other fixes/refactorings all over the
place
This commit is contained in:
1 parent
853e7f0765
commit
7fb9df9940
206 files changed
+1528
-5389
No files matched your search
@@ -1,6 +1,3 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from __future__ import absolute_import, division, print_function, unicode_literals
|
||||
|
||||
__author__ = "Gina Häußge <osd@foosel.net>"
|
||||
__license__ = "GNU Affero General Public License http://www.gnu.org/licenses/agpl.html"
|
||||
__copyright__ = "Copyright (C) 2014 The OctoPrint Project - Released under terms of the AGPLv3 License"
|
||||
@@ -33,7 +30,7 @@ def _git(args, cwd, hide_stderr=False):
|
||||
stderr=(subprocess.PIPE if hide_stderr else None),
|
||||
)
|
||||
break
|
||||
except EnvironmentError:
|
||||
except OSError:
|
||||
e = sys.exc_info()[1]
|
||||
if e.errno == errno.ENOENT:
|
||||
continue
|
||||
@@ -100,8 +97,6 @@ def get_latest(target, check, online=True, *args, **kwargs):
|
||||
logger = logging.getLogger(
|
||||
"octoprint.plugins.softwareupdate.version_checks.git_commit"
|
||||
)
|
||||
logger.debug(
|
||||
"Target: {}, local: {}, remote: {}".format(target, local_commit, remote_commit)
|
||||
)
|
||||
logger.debug(f"Target: {target}, local: {local_commit}, remote: {remote_commit}")
|
||||
|
||||
return information, is_current
|
||||
Reference in new issue
Block a user