Browse code

Support "none" as a possible value for properties

Lorenz Hüdepohl authored on07/05/2015 14:17:36
Showing1 changed files
... ...
@@ -41,6 +41,9 @@ parser = argparse.ArgumentParser(
41 41
  "keep-all", which is used as the number of old snapshots to keep. If there
42 42
  are more, the oldest are destroyed.
43 43
 
44
+ If the value is "none" the filesystem is ignored (useful to prohibit property
45
+ inheritance).
46
+
44 47
  Example:
45 48
 
46 49
    Setup properties:
... ...
@@ -91,7 +94,7 @@ encoding = locale.getdefaultlocale()[1]
91 94
 
92 95
 for line in zfs_props.stdout:
93 96
     fs, prop, number, source = line.decode(encoding).split("\t")
94
-    if number != "-":
97
+    if number != "-" and number != "none":
95 98
         if not args.delete_only:
96 99
             # Create new snapshot
97 100
             new_snapshot = "{0}@autosnapshot-{1}-{2}".format(fs, args.tagname,