From e6a4d1f8e20775a0128aadf99be67bff21971175 Mon Sep 17 00:00:00 2001 From: Paul McCarthy <pauldmccarthy@gmail.com> Date: Wed, 10 Oct 2018 14:56:33 +0100 Subject: [PATCH] RF: Avoid warnings --- fsl/data/dicom.py | 12 ++++++------ fsl/utils/idle.py | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/fsl/data/dicom.py b/fsl/data/dicom.py index 61e8086ed..0f586f6f9 100644 --- a/fsl/data/dicom.py +++ b/fsl/data/dicom.py @@ -119,12 +119,12 @@ def enabled(): """ cmd = 'dcm2niix -h' - versionPattern = re.compile('v' - '(?P<major>[0-9]+)\.' - '(?P<minor>[0-9]+)\.' - '(?P<year>[0-9]{4})' - '(?P<month>[0-9]{2})' - '(?P<day>[0-9]{2})') + versionPattern = re.compile(r'v' + '(?P<major>[0-9]+)\.' + '(?P<minor>[0-9]+)\.' + '(?P<year>[0-9]{4})' + '(?P<month>[0-9]{2})' + '(?P<day>[0-9]{2})') try: output = sp.check_output(cmd.split()).decode() diff --git a/fsl/utils/idle.py b/fsl/utils/idle.py index cdd86a016..ad883f6b4 100644 --- a/fsl/utils/idle.py +++ b/fsl/utils/idle.py @@ -85,7 +85,7 @@ import atexit import logging import functools import threading -import collections +import collections.abc as abc try: import queue except ImportError: import Queue as queue @@ -586,7 +586,7 @@ def wait(threads, task, *args, **kwargs): direct = kwargs.pop('wait_direct', False) - if not isinstance(threads, collections.Sequence): + if not isinstance(threads, abc.Sequence): threads = [threads] haveWX = fslplatform.haveGui -- GitLab