mirror of
https://github.com/Snigdha-OS/snigdhaos-kernel-switcher.git
synced 2025-09-06 07:05:12 +02:00
🧹 chore(up+): finished primary
This commit is contained in:
@@ -485,7 +485,7 @@ def parse_archive_html(response, linux_kernel):
|
|||||||
if len(files) > 0:
|
if len(files) > 0:
|
||||||
if "-x86_64" in files[0]:
|
if "-x86_64" in files[0]:
|
||||||
version = files[0].split("-x86_64")[0]
|
version = files[0].split("-x86_64")[0]
|
||||||
file_format = files[04].split("-x86_64")[1]
|
file_format = files[1].split("-x86_64")[1]
|
||||||
url = ("/packages/l/%s" % archlinux_mirror_archive_url + "/%s" % linux_kernel + "/%s" % files[0]) #URL Struct unknown to me!
|
url = ("/packages/l/%s" % archlinux_mirror_archive_url + "/%s" % linux_kernel + "/%s" % files[0]) #URL Struct unknown to me!
|
||||||
if ".sig" not in file_format:
|
if ".sig" not in file_format:
|
||||||
if len(line.rstrip().split(" ")) > 0:
|
if len(line.rstrip().split(" ")) > 0:
|
||||||
|
@@ -44,10 +44,31 @@ class Main(Gtk.Application):
|
|||||||
if os.path.exists(progress_lock_file):
|
if os.path.exists(progress_lock_file):
|
||||||
os.remove(progress_lock_file)
|
os.remove(progress_lock_file)
|
||||||
|
|
||||||
def snigdhal_handler(sig, frame):
|
def snigdhal_handler(sig, frame):
|
||||||
Gtk.main_quit(0)
|
Gtk.main_quit(0)
|
||||||
|
|
||||||
# if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
# try:
|
try:
|
||||||
# except Exception as e:
|
if not fn.os.path.isfile(lock_file):
|
||||||
# return False
|
with open(pid_file, "w") as f:
|
||||||
|
f.write(str(fn.os.getpid()))
|
||||||
|
app = Main()
|
||||||
|
app.run(None)
|
||||||
|
else:
|
||||||
|
md = Gtk.MessageDialog(parent=Main(), flags=0,message_type=Gtk.MessageType.INFO,buttons=Gtk.ButtonsType.YES_NO,text="%s Lock File Found!" % app_name)
|
||||||
|
md.format_secondary_markup("A %s lock file Found!\nAnother substance of %s is running!\nClick 'Yes' to remove the lockfile and restart the app." %(lock_file, app_name))
|
||||||
|
result = md.run()
|
||||||
|
md.destroy()
|
||||||
|
if result in (Gtk.ResponseType.OK, Gtk.ResponseType.YES):
|
||||||
|
pid = ""
|
||||||
|
if fn.os.path.exists(pid_file):
|
||||||
|
with open(pid_file, "r") as f:
|
||||||
|
i = f.read()
|
||||||
|
pid = i.rstrip().lstrip()
|
||||||
|
else:
|
||||||
|
fn.os.unlink(lock_file)
|
||||||
|
fn.sys.exit(1)
|
||||||
|
else:
|
||||||
|
fn.sys.exit(1)
|
||||||
|
except Exception as e:
|
||||||
|
print("Error Occured in __main__")
|
Reference in New Issue
Block a user