[pitivi] flatpak: Allow comments in json file
- From: Thibault Saunier <tsaunier src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pitivi] flatpak: Allow comments in json file
- Date: Sun, 30 Apr 2017 18:41:10 +0000 (UTC)
commit 82ccf63d62049f81c48ff1e9eeef7135b15bcac2
Author: Thibault Saunier <tsaunier gnome org>
Date: Sun Apr 30 14:01:11 2017 -0300
flatpak: Allow comments in json file
.pre-commit-config.yaml | 1 -
build/flatpak/pitivi-flatpak | 5 ++++-
2 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index d8e790f..0955605 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -3,7 +3,6 @@
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- - id: check-json
- id: autopep8-wrapper
files: ^git-phab$
- id: check-docstring-first
diff --git a/build/flatpak/pitivi-flatpak b/build/flatpak/pitivi-flatpak
index ca5ac30..3918c4d 100755
--- a/build/flatpak/pitivi-flatpak
+++ b/build/flatpak/pitivi-flatpak
@@ -22,6 +22,7 @@ import argparse
import configparser
import json
import os
+import re
import shutil
import subprocess
import sys
@@ -80,7 +81,9 @@ def expand_json_file(json_template, outfile, basedir, gst_version, branchname):
pass
with open(json_template, "r") as tf:
- template = json.load(tf)
+ txt = re.sub('/\*[^*]*\*+(?:[^/*][^*]*\*+)*/', '', tf.read())
+
+ template = json.loads(txt)
if branchname == "stable":
try:
del template["desktop-file-name-prefix"]
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]