bootstrap-vz/base/fs/partitions/swap.py

12 lines
265 B
Python
Raw Normal View History

from common.tools import log_check_call
from partition import Partition
class Swap(Partition):
def __init__(self, size, previous):
super(Swap, self).__init__(size, 'swap', previous)
def _format(self, e):
log_check_call(['/sbin/mkswap', self.device_path])