Revision 3ccb3a64 tools/lvmstrap
b/tools/lvmstrap | ||
---|---|---|
208 | 208 |
Currently only md devices are used as is. |
209 | 209 |
|
210 | 210 |
""" |
211 |
return not (disk.startswith('md') or PART_RE.match(disk))
|
|
211 |
return not (disk.startswith("md") or PART_RE.match(disk))
|
|
212 | 212 |
|
213 | 213 |
|
214 | 214 |
def DeviceName(disk): |
... | ... | |
219 | 219 |
|
220 | 220 |
""" |
221 | 221 |
if IsPartitioned(disk): |
222 |
device = '/dev/%s1' % disk
|
|
222 |
device = "/dev/%s1" % disk
|
|
223 | 223 |
else: |
224 |
device = '/dev/%s' % disk
|
|
224 |
device = "/dev/%s" % disk
|
|
225 | 225 |
return device |
226 | 226 |
|
227 | 227 |
|
... | ... | |
268 | 268 |
raise PrereqError("This tool runs as root only. Really.") |
269 | 269 |
|
270 | 270 |
osname, _, release, _, _ = os.uname() |
271 |
if osname != 'Linux':
|
|
271 |
if osname != "Linux":
|
|
272 | 272 |
raise PrereqError("This tool only runs on Linux" |
273 | 273 |
" (detected OS: %s)." % osname) |
274 | 274 |
|
Also available in: Unified diff