mirror of
https://github.com/parchlinux/calamares.git
synced 2025-02-24 10:55:46 -05:00
More precise error handling
This commit is contained in:
parent
adda405f83
commit
638a5c021c
1 changed files with 5 additions and 4 deletions
|
@ -161,10 +161,11 @@ def run():
|
|||
source = os.path.abspath(entry["source"])
|
||||
destination = os.path.abspath(root_mount_point + entry["destination"])
|
||||
|
||||
if not os.path.isfile(source) or not os.path.isdir(destination):
|
||||
return ("Bad source or destination",
|
||||
"source=\"{}\"\ndestination=\"{}\"".format(source,
|
||||
destination))
|
||||
if not os.path.isfile(source):
|
||||
return ("Bad source", "source=\"{}\"".format(source))
|
||||
if not os.path.isdir(destination):
|
||||
return ("Bad destination",
|
||||
"destination=\"{}\"".format(destination))
|
||||
|
||||
unpack.append(UnpackEntry(source, destination))
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue