clarify that the snapraid executable needs to be a file

This commit is contained in:
Chronial committed 2014-04-11 10:21:04 +01:00
1 parent 45e0365931
commit 716d30bc52
2 files changed
+7 -6

No files matched your search

+2 -2
View File
@@ -1,6 +1,6 @@
[snapraid] [snapraid]
; path to the snapraid executable ; path to the snapraid executable (e.g. /bin/snapraid)
executable = executable = snapraid
; path to the snapraid config to be used ; path to the snapraid config to be used
config = snapraid.conf config = snapraid.conf
; abort operation if there are more deletes than this, set to -1 to disable ; abort operation if there are more deletes than this, set to -1 to disable
+5 -4
View File
@@ -217,11 +217,12 @@ def run():
logging.info("Run started") logging.info("Run started")
logging.info("=" * 60) logging.info("=" * 60)
if not os.path.exists(config["snapraid"]["executable"]): if not os.path.isfile(config["snapraid"]["executable"]):
logging.error("Snapraid executable does not exist at " + logging.error("The configured snapraid executable \"{}\" does not "
config["snapraid"]["executable"]) "exist or is not a file".format(
config["snapraid"]["executable"]))
finish(False) finish(False)
if not os.path.exists(config["snapraid"]["config"]): if not os.path.isfile(config["snapraid"]["config"]):
logging.error("Snapraid config does not exist at " + logging.error("Snapraid config does not exist at " +
config["snapraid"]["config"]) config["snapraid"]["config"])
finish(False) finish(False)