aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'modules/fstab/getDevs.py')
-rw-r--r--modules/fstab/getDevs.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/modules/fstab/getDevs.py b/modules/fstab/getDevs.py
new file mode 100644
index 0000000..3180d0d
--- /dev/null
+++ b/modules/fstab/getDevs.py
@@ -0,0 +1,14 @@
+"""
+This function makes sure the user enters a valid block device in /etc/fstab
+"""
+
+import os
+import re
+import os.path as osp
+
+def validate(userIn):
+ pdb.set_trace()
+ devices = os.listdir('/dev')
+ if osp.split(userIn)[1] in devices:
+ return True
+ return False