Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ run: build
build/lib/live-installer/main.py

pot:
xgettext -o live-installer.pot --from-code="utf-8" live-installer/resources/*.ui `find live-installer -type f -iname "*.py"`
xgettext -o po/live-installer.pot --from-code="utf-8" live-installer/resources/*.ui `find live-installer -type f -iname "*.py"`
for file in `ls po/*.po`; do \
msgmerge $$file live-installer.pot -o $$file.new ; \
msgmerge $$file po/live-installer.pot -o $$file.new ; \
rm -f $$file ; \
mv $$file.new $$file ; \
done \
Expand Down
6 changes: 3 additions & 3 deletions live-installer/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@
from frontend import *
from frontend.dialogs import ErrorDialog

single_instance()


gettext.install("live-installer", "/usr/share/locale")
sys.path.insert(1, '/lib/live-installer')
if (os.path.isdir("/lib/live-installer")):
Expand Down Expand Up @@ -37,6 +34,9 @@ def exceptdebug(e, v, tb):
os.environ["TEST"]="1"
if "--expert" in sys.argv:
os.environ["EXPERT_MODE"]="1"

# Check for single instance (after test mode is set)
single_instance()
if not is_root() and "--test" not in sys.argv:
ErrorDialog(config.get("distro_title", "17g"), _("You must be root!"))
exit(1)
Expand Down
6 changes: 5 additions & 1 deletion live-installer/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,11 @@ def set_governor(governor):
i += 1

def single_instance():
pidfile = "/run/live-installer.pid"
# Use temp directory for PID file in test mode
if "TEST" in os.environ:
pidfile = "/tmp/live-installer.pid"
else:
pidfile = "/run/live-installer.pid"
def writepid():
with open(pidfile, "w") as f:
f.write(str(os.getpid()))
Expand Down
Loading