Skip to content

Commit ddcfc0a

Browse files
committed
Fix use of deprecated flask.ext imports
flask.ext has been deprecated for years now and has been logging a warning to console ever since. OctoPrint 1.4.1 had to update the flask dependencies due to security considerations and with the new flask version the old compatibility layer still allowing flask.ext to work got removed. See also the discussion in OctoPrint/OctoPrint#3638 Closes #269
1 parent a5b3bca commit ddcfc0a

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

octoprint_telegram/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
from subprocess import Popen, PIPE
44
import threading, requests, re, time, datetime, StringIO, json, random, logging, traceback, io, collections, os, flask,base64,PIL, pkg_resources,subprocess,zipfile,glob #,resource
55
import octoprint.plugin, octoprint.util, octoprint.filemanager
6-
from flask.ext.babel import gettext
7-
from flask.ext.login import current_user
6+
from flask_babel import gettext
7+
from flask_login import current_user
88
from .telegramCommands import TCMD # telegramCommands.
99
from .telegramNotifications import TMSG # telegramNotifications
1010
from .telegramNotifications import telegramMsgDict # dict of known notification messages

octoprint_telegram/telegramCommands.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
import logging, sarge, hashlib, datetime, time, operator, socket
33
import octoprint.filemanager
44
import requests
5-
from flask.ext.babel import gettext
5+
from flask_babel import gettext
66
from .telegramNotifications import telegramMsgDict
77

88
################################################################################################################

octoprint_telegram/telegramNotifications.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
from __future__ import absolute_import
22
import time, datetime, logging
33
import octoprint.util
4-
from flask.ext.babel import gettext
4+
from flask_babel import gettext
55

66
###################################################################################################
77
# Here you find the known notification messages and their handles.

0 commit comments

Comments
 (0)