Browse Source

removed comments

control 3 năm trước cách đây
mục cha
commit
2dc1b079c4
1 tập tin đã thay đổi với 1 bổ sung9 xóa
  1. 1 9
      app/iconfetch.py

+ 1 - 9
app/iconfetch.py

@@ -8,7 +8,6 @@ import subprocess as sp
 import re, os
 
 def check_icon(sitename):
-    print('checking icon')##
     # checks for site icon in storage
     str1 = sitename.replace('/', '')
     sitename = f'{str1.replace(":", ".")}.ico'
@@ -18,14 +17,11 @@ def check_icon(sitename):
     result = [os.path.join(root, sitename) for root, dirs, files in os.walk(path) if sitename in files] 
 
     if result:
-        print('returning True')##
         return f'{sitename}'
     else:
-        print('returning False')##
         return False
 
 def fetch_icon(sitename):
-    print('fetching icon')##
     path = 'static/sitecons/'
 
     # search end of string for leading slash
@@ -41,10 +37,6 @@ def fetch_icon(sitename):
     str1 = sitename.replace('/', '')
     sitename = str1.replace(':', '.')
 
-    print(parsed_name)##
-    print(f'wget {parsed_name} -O {path}{sitename}.ico')
-    p1 = sp.run(f'wget {parsed_name} -O app/{path}{sitename}.ico', shell=True, capture_output=True, text=True)
-    print(p1.stdout)##
-    print('checking icon')##
+    p1 = sp.run(f'wget {parsed_name} -O app/{path}{sitename}.ico', shell=True)
 
     return f'{sitename}.ico'