about summary refs log tree commit diff stats
path: root/miasm/__init__.py
diff options
context:
space:
mode:
Diffstat (limited to 'miasm/__init__.py')
-rw-r--r--miasm/__init__.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/miasm/__init__.py b/miasm/__init__.py
index 417a6268..309a1ae7 100644
--- a/miasm/__init__.py
+++ b/miasm/__init__.py
@@ -40,13 +40,13 @@ def _version_from_git_describe():
 
     if process.returncode == 0:
         tag = out.decode().strip()
-        match = re.match('^v?(.+?)-(\\d+)-g[a-f0-9]+$', tag)
+        match = re.match(r'^v?(.+?)-(\d+)-g[a-f0-9]+$', tag)
         if match:
             # remove the 'v' prefix and add a '.devN' suffix
             return '%s.dev%s' % (match.group(1), match.group(2))
         else:
             # just remove the 'v' prefix
-            return re.sub('^v', '', tag)
+            return re.sub(r'^v', '', tag)
     else:
         raise subprocess.CalledProcessError(process.returncode, err)
 
@@ -71,7 +71,7 @@ def _version():
             # See 'man gitattributes' for more details.
             git_archive_id = '$Format:%h %d$'
             sha1 = git_archive_id.strip().split()[0]
-            match = re.search('tag:(\\S+)', git_archive_id)
+            match = re.search(r'tag:(\S+)', git_archive_id)
             if match:
                 return "git-archive.dev" + match.group(1)
             elif sha1: