~sircmpwn/sr.ht-dev

Development discussion for sr.ht. When contributing patches to sr.ht, please edit the [PATCH] line to include the specific sr.ht project you're contributing to, e.g.

[PATCH lists.sr.ht v2] Add thing to stuff

Patches

1 2

[PATCH builds.sr.ht] Force LF line endings for secrets

Details
Message ID
<20180830183221.32377-1-hilobakho@gmail.com>
Download raw message
Patch +2 -2
---
 buildsrht/blueprints/secrets.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/buildsrht/blueprints/secrets.py b/buildsrht/blueprints/secrets.py
index e057605..d4ff436 100644
--- a/buildsrht/blueprints/secrets.py
+++ b/buildsrht/blueprints/secrets.py
@@ -44,8 +44,8 @@ def secrets_POST():
             valid.expect(bool(_secret) ^ bool(secret_file),
                     "Either secret text or file have to be provided", field=f)
         if _secret:
-            _secret = _secret.replace(r'\r\n', r'\n')
-            if not _secret.endswith(r'\n'):
+            _secret = _secret.replace('\r\n', '\n')
+            if not _secret.endswith('\n'):
                 _secret += '\n'
         else:
             _secret = secret_file
-- 
2.15.1
Details
Message ID
<20180830183429.GA5744@miku>
In-Reply-To
<20180830183221.32377-1-hilobakho@gmail.com> (view parent)
Download raw message
Thanks!

To git.sr.ht:~sircmpwn/builds.sr.ht
   6dd349e..3caee6d  master -> master