From 51c7e763e5bfda5926a269500a90251df0091f76 Mon Sep 17 00:00:00 2001 From: Karthikeyan Singaravelan Date: Wed, 22 Jan 2020 18:35:41 +0530 Subject: Fix DeprecationWarning regarding invalid escape sequence. Fix SyntaxWarning regarding literal comparison. --- glances/amps/glances_default.py | 2 +- glances/amps/glances_nginx.py | 2 +- glances/amps/glances_systemd.py | 2 +- glances/amps/glances_systemv.py | 2 +- glances/config.py | 2 +- glances/outputs/glances_curses.py | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/glances/amps/glances_default.py b/glances/amps/glances_default.py index f57865a4..d942939a 100644 --- a/glances/amps/glances_default.py +++ b/glances/amps/glances_default.py @@ -17,7 +17,7 @@ # You should have received a copy of the GNU Lesser General Public License # along with this program. If not, see . -""" +r""" Default AMP ========= diff --git a/glances/amps/glances_nginx.py b/glances/amps/glances_nginx.py index 9add7bc2..6cc5fb3b 100644 --- a/glances/amps/glances_nginx.py +++ b/glances/amps/glances_nginx.py @@ -17,7 +17,7 @@ # You should have received a copy of the GNU Lesser General Public License # along with this program. If not, see . -""" +r""" Nginx AMP ========= diff --git a/glances/amps/glances_systemd.py b/glances/amps/glances_systemd.py index 9c9de08f..993bfefc 100644 --- a/glances/amps/glances_systemd.py +++ b/glances/amps/glances_systemd.py @@ -17,7 +17,7 @@ # You should have received a copy of the GNU Lesser General Public License # along with this program. If not, see . -""" +r""" Systemd AMP =========== diff --git a/glances/amps/glances_systemv.py b/glances/amps/glances_systemv.py index a55392c7..c28a4fde 100644 --- a/glances/amps/glances_systemv.py +++ b/glances/amps/glances_systemv.py @@ -17,7 +17,7 @@ # You should have received a copy of the GNU Lesser General Public License # along with this program. If not, see . -""" +r""" SystemV AMP =========== diff --git a/glances/config.py b/glances/config.py index 6bdf0cc4..811dd5b3 100644 --- a/glances/config.py +++ b/glances/config.py @@ -105,7 +105,7 @@ class Config(object): self._loaded_config_file = None # Re patern for optimize research of `foo` - self.re_pattern = re.compile('(\`.+?\`)') + self.re_pattern = re.compile(r'(\`.+?\`)') self.parser = ConfigParser() self.read() diff --git a/glances/outputs/glances_curses.py b/glances/outputs/glances_curses.py index a1e00d2d..782a1a32 100644 --- a/glances/outputs/glances_curses.py +++ b/glances/outputs/glances_curses.py @@ -697,7 +697,7 @@ class _GlancesCurses(object): if p in stat_display: self.display_plugin(stat_display[p], display_optional=plugin_display_optional[p]) - if p is not 'load': + if p != 'load': # Skip last column self.new_column() -- cgit v1.2.3