diff options
author | Nicolas Hennion <nicolas@nicolargo.com> | 2020-01-22 18:28:01 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-01-22 18:28:01 +0100 |
commit | 3e5ec443cea6edfd705622b4c90da2783ff8bc35 (patch) | |
tree | e47fcd8e85f5171a0efc6fbd9ebaa650bab0c1ef | |
parent | b55d4925b061a47b79d771b0de4b6efefba899a7 (diff) | |
parent | 2e00997e3392fea60d5fc476dc3755c434301237 (diff) |
Merge pull request #1586 from tirkarthi/fix-python-39
Fix warnings and improve Python 3.9 compatibility.
-rw-r--r-- | glances/amps/glances_default.py | 2 | ||||
-rw-r--r-- | glances/amps/glances_nginx.py | 2 | ||||
-rw-r--r-- | glances/amps/glances_systemd.py | 2 | ||||
-rw-r--r-- | glances/amps/glances_systemv.py | 2 | ||||
-rw-r--r-- | glances/config.py | 2 | ||||
-rw-r--r-- | glances/outputs/glances_curses.py | 2 | ||||
-rw-r--r-- | glances/plugins/glances_ports.py | 2 |
7 files changed, 7 insertions, 7 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 <http://www.gnu.org/licenses/>. -""" +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 <http://www.gnu.org/licenses/>. -""" +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 <http://www.gnu.org/licenses/>. -""" +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 <http://www.gnu.org/licenses/>. -""" +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() diff --git a/glances/plugins/glances_ports.py b/glances/plugins/glances_ports.py index b2db43a9..069fd59c 100644 --- a/glances/plugins/glances_ports.py +++ b/glances/plugins/glances_ports.py @@ -82,7 +82,7 @@ class Plugin(GlancesPlugin): if self._thread is None: thread_is_running = False else: - thread_is_running = self._thread.isAlive() + thread_is_running = self._thread.is_alive() if self.timer_ports.finished() and not thread_is_running: # Run ports scanner self._thread = ThreadScanner(self.stats) |