Fix indentation and regexp escaping
authorMagnus Hagander <magnus@hagander.net>
Mon, 4 Jan 2021 12:57:19 +0000 (13:57 +0100)
committerMagnus Hagander <magnus@hagander.net>
Mon, 4 Jan 2021 12:57:19 +0000 (13:57 +0100)
triggers.py

index c78aab7e3083c7030235c158eeed748a6c407b4a..c875322c04f4b14e3e05d4321b7d6ed740ff1779 100644 (file)
@@ -28,9 +28,11 @@ class varnishpurger(object):
         # Make a callback to a local varnish server to purge a repository
         # from it. Assumes gitweb style URLs.
         # Also, purge the actual http serving git repo itself.
-        for u in ['^/gitweb/?$',
-                  '^/gitweb/\?p=%s.git' % reponame,
-                  '^/git/%s' % reponame]:
+        for u in [
+                r'^/gitweb/?$',
+                r'^/gitweb/\?p=%s.git' % reponame,
+                r'^/git/%s' % reponame,
+        ]:
             if not self._internal_purge(u):
                 print("Varnish purge failed, website may become slightly out of date")
                 return