'--mbrtogpt',
'--',
self.path,
- ]
+ ],
+ exit=True
)
update_partition(self.path, 'created')
return num
'--',
partition.get_dev(),
])
- try:
- LOG.debug('Creating %s fs on %s',
- self.args.fs_type, partition.get_dev())
- command_check_call(args)
- except subprocess.CalledProcessError as e:
- raise Error(e)
+ LOG.debug('Creating %s fs on %s',
+ self.args.fs_type, partition.get_dev())
+ command_check_call(args, exit=True)
path = mount(dev=partition.get_dev(),
fstype=self.args.fs_type,
partition.unmap()
if not is_partition(self.args.data):
- try:
- command_check_call(
- [
- 'sgdisk',
- '--typecode=%d:%s' % (partition.get_partition_number(),
- partition.ptype_for_name('osd')),
- '--',
- self.args.data,
- ],
- )
- except subprocess.CalledProcessError as e:
- raise Error(e)
+ command_check_call(
+ [
+ 'sgdisk',
+ '--typecode=%d:%s' % (partition.get_partition_number(),
+ partition.ptype_for_name('osd')),
+ '--',
+ self.args.data,
+ ],
+ exit=True,
+ )
update_partition(self.args.data, 'prepared')
command_check_call(['udevadm', 'trigger',
'--action=add',