Skip to content

Commit

Permalink
A nicer is_path_on_btrfs, instead
Browse files Browse the repository at this point in the history
  • Loading branch information
Jonathan Carter committed Sep 7, 2012
1 parent e69454f commit 6463247
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions llxc.py
Expand Up @@ -114,9 +114,6 @@ def listarchive():

def status():
"""Prints a status report for specified container"""

print (is_lxcpath_on_btrfs())

requires_container_existance()

cont = lxc.Container(containername)
Expand Down Expand Up @@ -684,9 +681,9 @@ def requires_free_memory():
print (_("Not Implemented"))


def is_lxcpath_on_btrfs():
"""Check whether lxcpath is on btrfs, returns true if it is"""
btrfs_output = os.popen("btrfs filesystem df " + CONTAINER_PATH).read()
def is_path_on_btrfs(path):
"""Check whether a path is on btrfs, returns true if it is"""
btrfs_output = os.popen("btrfs filesystem df " + path).read()
if "Data" in btrfs_output:
return True
else:
Expand Down

0 comments on commit 6463247

Please sign in to comment.