Skip to content
Snippets Groups Projects
Commit 4af9954d authored by Hugo Posnic's avatar Hugo Posnic
Browse files

Minor things

parent 9480e9f4
No related branches found
No related tags found
No related merge requests found
......@@ -25,9 +25,7 @@ import json
class ConsoleHelpers:
"""
Console Helpers class
"""
"""Console Helpers class"""
@staticmethod
def list_to_tuple(list_data, named_tuple):
......
......@@ -24,17 +24,17 @@ Graphical UI Module
"""
import gi
from . import i18n
from . import txt
gi.require_version("Gtk", "3.0")
from gi.repository import Gtk
from . import i18n
from . import txt
_ = i18n.language.gettext
class GraphicalUI(Gtk.Window):
""" Class GraphicalUI """
"""Class GraphicalUI"""
def __init__(self, server_list):
Gtk.Window.__init__(self, title=txt.I_TITLE)
self.set_size_request(700, 350)
......@@ -100,7 +100,6 @@ class GraphicalUI(Gtk.Window):
for server in self.custom_list:
if server["url"][:-20] == self.mirrors_liststore[path][3]:
self.custom_list.remove(server)
self.button_done.set_sensitive(bool(self.custom_list))
def cancel(self):
......
......@@ -59,9 +59,7 @@ _ = i18n.language.gettext
class PacmanMirrors:
"""
Class PacmanMirrors
"""
"""Class PacmanMirrors"""
def __init__(self):
""" Init """
......
......@@ -23,6 +23,7 @@ import shutil
from pacman_mirrors import pacman_mirrors
from pacman_mirrors import i18n
_ = i18n.language.gettext
......@@ -31,15 +32,13 @@ def move_custom_country():
Move custom country file from /etc/pacman.d/mirrors/ to
/var/lib/pacman-mirrors/
"""
print(
_("Moving 'Custom' mirrors file to ") + "/var/lib/pacman-mirrors/")
print(_("Moving 'Custom' mirrors file to ") + "/var/lib/pacman-mirrors/")
os.makedirs("/var/lib/pacman-mirrors", mode=0o755, exist_ok=True)
try:
shutil.move("/etc/pacman.d/mirrors/Custom",
"/var/lib/pacman-mirrors/Custom")
except OSError as e:
print(
_("Warning: Cannot move '{filename}' to '{filename2}': {error}"
print(_("Warning: Cannot move '{filename}' to '{filename2}': {error}"
.format(filename=e.filename,
filename2=e.filename2,
error=e.strerror)))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment