mirror of
https://github.com/Snigdha-OS/snigdhaos-blackbox.git
synced 2025-09-21 20:15:02 +02:00
⏳ @eshanized updated the repository!!!
This commit is contained in:
@@ -119,7 +119,7 @@ try:
|
|||||||
# NOTE: Rotate the fucking event log!
|
# NOTE: Rotate the fucking event log!
|
||||||
tfh = TimedRotatingFileHandler(
|
tfh = TimedRotatingFileHandler(
|
||||||
event_log_file,
|
event_log_file,
|
||||||
encoding="UTF-8",
|
encoding="utf-8",
|
||||||
delay=False,
|
delay=False,
|
||||||
when="W4",
|
when="W4",
|
||||||
)
|
)
|
||||||
@@ -221,7 +221,7 @@ def sync_package_db():
|
|||||||
return None
|
return None
|
||||||
else:
|
else:
|
||||||
if process_sync.stdout:
|
if process_sync.stdout:
|
||||||
out = str(process_sync.stdout.decode("UTF-8"))
|
out = str(process_sync.stdout.decode("utf-8"))
|
||||||
logger.error(out)
|
logger.error(out)
|
||||||
return out
|
return out
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
@@ -250,7 +250,7 @@ def sync_file_db():
|
|||||||
return None
|
return None
|
||||||
else:
|
else:
|
||||||
if process_sync.stdout:
|
if process_sync.stdout:
|
||||||
out = str(process_sync.stdout.decode("UTF-8"))
|
out = str(process_sync.stdout.decode("utf-8"))
|
||||||
logger.error(out)
|
logger.error(out)
|
||||||
return out
|
return out
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
@@ -683,7 +683,7 @@ def check_pacman_localdb(package_name):
|
|||||||
timeout=process_timeout,
|
timeout=process_timeout,
|
||||||
)
|
)
|
||||||
if process_pkg_installed.returncode == 0:
|
if process_pkg_installed.returncode == 0:
|
||||||
for line in process_pkg_installed.stdout.decode("UTF-8").splitlines():
|
for line in process_pkg_installed.stdout.decode("utf-8").splitlines():
|
||||||
if line.startswith("Name :"):
|
if line.startswith("Name :"):
|
||||||
if line.replace(" ", "").split("Name:")[1].strip() == package_name:
|
if line.replace(" ", "").split("Name:")[1].strip() == package_name:
|
||||||
return True
|
return True
|
||||||
@@ -854,7 +854,7 @@ def store_packages():
|
|||||||
"An error occurred during sort of packages in stored_packages()"
|
"An error occurred during sort of packages in stored_packages()"
|
||||||
)
|
)
|
||||||
else:
|
else:
|
||||||
with open(cache, "w", encoding="UTF-8") as f:
|
with open(cache, "w", encoding="utf-8") as f:
|
||||||
for key in category_dict.keys():
|
for key in category_dict.keys():
|
||||||
pkg_list = category_dict[key]
|
pkg_list = category_dict[key]
|
||||||
for pkg in pkg_list:
|
for pkg in pkg_list:
|
||||||
@@ -886,7 +886,7 @@ def get_all_package_info():
|
|||||||
package_version = "Unknown"
|
package_version = "Unknown"
|
||||||
package_description = "Unknown"
|
package_description = "Unknown"
|
||||||
package_repository = "Unknown"
|
package_repository = "Unknown"
|
||||||
for line in out.decode("UTF-8").splitlines():
|
for line in out.decode("utf-8").splitlines():
|
||||||
package_dict = {}
|
package_dict = {}
|
||||||
if "Name :" in line.strip():
|
if "Name :" in line.strip():
|
||||||
package_name = line.replace(" ", "").split("Name:")[1].strip()
|
package_name = line.replace(" ", "").split("Name:")[1].strip()
|
||||||
@@ -957,7 +957,7 @@ def cache(package, path_dir_cache):
|
|||||||
out, err = process.communicate()
|
out, err = process.communicate()
|
||||||
|
|
||||||
if process.returncode == 0:
|
if process.returncode == 0:
|
||||||
output = out.decode("UTF-8")
|
output = out.decode("utf-8")
|
||||||
if len(output) > 0:
|
if len(output) > 0:
|
||||||
split = output.splitlines()
|
split = output.splitlines()
|
||||||
desc = str(split[3])
|
desc = str(split[3])
|
||||||
@@ -1073,7 +1073,7 @@ def get_package_files(package_name):
|
|||||||
)
|
)
|
||||||
if process.returncode == 0:
|
if process.returncode == 0:
|
||||||
package_files = []
|
package_files = []
|
||||||
for line in process.stdout.decode("UTF-8").splitlines():
|
for line in process.stdout.decode("utf-8").splitlines():
|
||||||
package_files.append(line.split(" ")[1], None)
|
package_files.append(line.split(" ")[1], None)
|
||||||
return package_files
|
return package_files
|
||||||
else:
|
else:
|
||||||
@@ -1636,7 +1636,7 @@ def update_textview_pacmanlog(self):
|
|||||||
if len(line) > 0:
|
if len(line) > 0:
|
||||||
buffer.insert(
|
buffer.insert(
|
||||||
end_iter,
|
end_iter,
|
||||||
line.decode("UTF-8"),
|
line.decode("utf-8"),
|
||||||
len(line),
|
len(line),
|
||||||
)
|
)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
@@ -1715,7 +1715,7 @@ def remove_snigdhaos_repos():
|
|||||||
)
|
)
|
||||||
lines = []
|
lines = []
|
||||||
with open(
|
with open(
|
||||||
pacman_conf, "r", encoding="UTF-8"
|
pacman_conf, "r", encoding="utf-8"
|
||||||
) as r:
|
) as r:
|
||||||
lines = r.readlines()
|
lines = r.readlines()
|
||||||
if len(lines) > 0:
|
if len(lines) > 0:
|
||||||
|
@@ -55,9 +55,9 @@ class Main(Gtk.Window):
|
|||||||
self.search_activated = False
|
self.search_activated = False
|
||||||
self.display_package_progress = False
|
self.display_package_progress = False
|
||||||
print("******************************************************")
|
print("******************************************************")
|
||||||
print(" Report error:")
|
print(" Report error")
|
||||||
print("******************************************************")
|
print("******************************************************")
|
||||||
print("")
|
print("https://github.com/snigdha-os/snigdhaos-blackbox")
|
||||||
print("******************************************************")
|
print("******************************************************")
|
||||||
if os.path.exists(fn.blackbox_lockfile):
|
if os.path.exists(fn.blackbox_lockfile):
|
||||||
running = fn.check_if_process_running("blackbox")
|
running = fn.check_if_process_running("blackbox")
|
||||||
@@ -79,7 +79,7 @@ class Main(Gtk.Window):
|
|||||||
message_dialog = MessageDialog(
|
message_dialog = MessageDialog(
|
||||||
"Error",
|
"Error",
|
||||||
"Blackbox failed to initiate, Pacman Lockfile Found!",
|
"Blackbox failed to initiate, Pacman Lockfile Found!",
|
||||||
"Pacman unable to lock the database!" % fn. pacman_lockfile,
|
"Pacman unable to lock the database!" % fn.pacman_lockfile,
|
||||||
"Is another process running?",
|
"Is another process running?",
|
||||||
"error",
|
"error",
|
||||||
False,
|
False,
|
||||||
@@ -89,13 +89,13 @@ class Main(Gtk.Window):
|
|||||||
message_dialog.hide()
|
message_dialog.hide()
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
fn.logger.info(
|
fn.logger.info(
|
||||||
"pkgver = pkgversion"
|
"pkgver : pkgversion"
|
||||||
)
|
)
|
||||||
fn.logger.info(
|
fn.logger.info(
|
||||||
"pkgrel = pkgrelease"
|
"pkgrel : pkgrelease"
|
||||||
)
|
)
|
||||||
print("*************************************************")
|
print("*************************************************")
|
||||||
fn.logger.info("Distro = " + fn.distr)
|
fn.logger.info("Distro : " + fn.distr)
|
||||||
print("*************************************************")
|
print("*************************************************")
|
||||||
if os.path.isdir(fn.home + "/.config/gtk-3.0"):
|
if os.path.isdir(fn.home + "/.config/gtk-3.0"):
|
||||||
try:
|
try:
|
||||||
|
Binary file not shown.
Before Width: | Height: | Size: 5.1 KiB After Width: | Height: | Size: 5.3 KiB |
Reference in New Issue
Block a user