gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[www_shared] 07/19: debug print statements.


From: gnunet
Subject: [www_shared] 07/19: debug print statements.
Date: Sat, 25 Jan 2020 11:29:22 +0100

This is an automated email from the git hooks/post-receive script.

ng0 pushed a commit to branch master
in repository www_shared.

commit 20373c170a50c50380a72a04ef1beb4e715efb70
Author: ng0 <address@hidden>
AuthorDate: Wed Nov 13 00:22:39 2019 +0000

    debug print statements.
---
 site.py | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/site.py b/site.py
index 9fd9ac8..41e5e40 100644
--- a/site.py
+++ b/site.py
@@ -42,14 +42,14 @@ class gen_site:
 
     def run(self, root, conf, env):
         # root = "../" + root
-        if self.debug:
+        if self.debug > 1:
             _ = Path(".")
             q = list(_.glob("**/*.j2"))
             print(q)
         # for in_file in glob.glob(root + "/*.j2"):
         for in_file in Path(".").glob(root + "/*.j2"):
             in_file = str(in_file)
-            if self.debug:
+            if self.debug > 1:
                 print(in_file)
             name, ext = re.match(r"(.*)\.([^.]+)$",
                                  in_file.rstrip(".j2")).groups()
@@ -100,7 +100,7 @@ class gen_site:
             # https://bugs.python.org/issue22276
             for l in list(x for x in Path(".").glob("locale/*/") if 
x.is_dir()):
                 l = str(PurePath(l).name)
-                if self.debug:
+                if self.debug > 1:
                     print(l)
                 # locale = os.path.basename(l[:-1])
                 locale = l
@@ -147,7 +147,8 @@ class gen_site:
 
                 with codecs.open(out_name, "w", encoding='utf-8') as f:
                     try:
-                        print(Path.cwd())
+                        if self.debug > 1:
+                            print(Path.cwd())
                         f.write(content)
                     except e as Error:
                         print(e)

-- 
To stop receiving notification emails like this one, please contact
address@hidden.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]