[unpackfs] Log messages in English, too
- For debugging purposes, need to log the message in English before returning the (user-visible) error description.
This commit is contained in:
parent
4004af09ad
commit
28efe2b85a
@ -293,11 +293,13 @@ def run():
|
|||||||
root_mount_point = globalstorage.value("rootMountPoint")
|
root_mount_point = globalstorage.value("rootMountPoint")
|
||||||
|
|
||||||
if not root_mount_point:
|
if not root_mount_point:
|
||||||
|
utils.warning("No mount point for root partition")
|
||||||
return (_("No mount point for root partition"),
|
return (_("No mount point for root partition"),
|
||||||
_("globalstorage does not contain a \"rootMountPoint\" key, "
|
_("globalstorage does not contain a \"rootMountPoint\" key, "
|
||||||
"doing nothing"))
|
"doing nothing"))
|
||||||
|
|
||||||
if not os.path.exists(root_mount_point):
|
if not os.path.exists(root_mount_point):
|
||||||
|
utils.warning("Bad root mount point \"{}\"".format(root_mount_point))
|
||||||
return (_("Bad mount point for root partition"),
|
return (_("Bad mount point for root partition"),
|
||||||
_("rootMountPoint is \"{}\", which does not "
|
_("rootMountPoint is \"{}\", which does not "
|
||||||
"exist, doing nothing").format(root_mount_point))
|
"exist, doing nothing").format(root_mount_point))
|
||||||
@ -311,16 +313,19 @@ def run():
|
|||||||
sourcefs = entry["sourcefs"]
|
sourcefs = entry["sourcefs"]
|
||||||
|
|
||||||
if sourcefs not in supported_filesystems:
|
if sourcefs not in supported_filesystems:
|
||||||
|
utils.warning("The filesystem for \"{}\" ({}) is not supported".format(source, sourcefs))
|
||||||
return (_("Bad unsquash configuration"),
|
return (_("Bad unsquash configuration"),
|
||||||
_("The filesystem for \"{}\" ({}) is not supported").format(source, sourcefs))
|
_("The filesystem for \"{}\" ({}) is not supported").format(source, sourcefs))
|
||||||
|
|
||||||
destination = os.path.abspath(root_mount_point + entry["destination"])
|
destination = os.path.abspath(root_mount_point + entry["destination"])
|
||||||
|
|
||||||
if not os.path.exists(source):
|
if not os.path.exists(source):
|
||||||
|
utils.warning("The source filesystem \"{}\" does not exist".format(source))
|
||||||
return (_("Bad unsquash configuration"),
|
return (_("Bad unsquash configuration"),
|
||||||
_("The source filesystem \"{}\" does not exist").format(source))
|
_("The source filesystem \"{}\" does not exist").format(source))
|
||||||
|
|
||||||
if not os.path.isdir(destination):
|
if not os.path.isdir(destination):
|
||||||
|
utils.warning(("The destination \"{}\" in the target system is not a directory").format(destination))
|
||||||
return (_("Bad unsquash configuration"),
|
return (_("Bad unsquash configuration"),
|
||||||
_("The destination \"{}\" in the target system is not a directory").format(destination))
|
_("The destination \"{}\" in the target system is not a directory").format(destination))
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user