Index: pydir/utils.py |
diff --git a/pydir/utils.py b/pydir/utils.py |
index 1141e3e1a0f577396f9f11c3feacb3703bcbc5ce..6fdedfafae03f4d1968e303661a9107c699fe818 100644 |
--- a/pydir/utils.py |
+++ b/pydir/utils.py |
@@ -20,3 +20,12 @@ def FindBaseNaCl(): |
return None |
last_index = len(path_list) - path_list[::-1].index(nacl) |
return os.sep.join(path_list[:last_index]) |
+ |
+def get_sfi_string(args, sb_ret, nonsfi_ret, native_ret): |
+ """Return a value depending on args.sandbox and args.nonsfi.""" |
+ if args.sandbox: |
+ assert(not args.nonsfi) |
+ return sb_ret |
+ if args.nonsfi: |
+ return nonsfi_ret |
+ return native_ret |