mirror of
https://github.com/kevingruesser/bootstrap-vz.git
synced 2025-08-24 07:26:29 +00:00
PEP8-ify things.
This commit is contained in:
parent
e1fc5ea972
commit
b5c5acf5b1
12 changed files with 38 additions and 27 deletions
12
CONTRIBUTING.md
Normal file
12
CONTRIBUTING.md
Normal file
|
@ -0,0 +1,12 @@
|
|||
# Coding standards #
|
||||
* Specify the full path when invoking a command.
|
||||
* Use long options whenever possible, this makes the commands invoked a lot easier to understand.
|
||||
* Use tabs for indentation and spaces for alignment.
|
||||
* Max line length is 110 chars.
|
||||
* Multiple assignments may be aligned.
|
||||
* Follow PEP8 with the exception of the following rules
|
||||
* E101: Indenting with tabs and aligning with spaces
|
||||
* E221: Alignment of assignments
|
||||
* E241: Alignment of assignments
|
||||
* E501: The line length is 110 characters not 80
|
||||
* W191: We indent with tabs not spaces
|
|
@ -11,7 +11,6 @@ class ConfigureGrub(Task):
|
|||
rwxr_xr_x = (stat.S_IRUSR | stat.S_IWUSR | stat.S_IXUSR |
|
||||
stat.S_IRGRP | stat.S_IXGRP |
|
||||
stat.S_IROTH | stat.S_IXOTH)
|
||||
x_all = stat.S_IXUSR | stat.S_IXGRP | stat.S_IXOTH
|
||||
import os.path
|
||||
device_map_path = os.path.join(info.root, 'boot/grub/device.map')
|
||||
with open(device_map_path, 'w') as device_map:
|
||||
|
@ -30,6 +29,6 @@ class ConfigureGrub(Task):
|
|||
os.chmod(script_dst, rwxr_xr_x)
|
||||
log_check_call(['/usr/sbin/chroot', info.root, '/usr/sbin/update-initramfs', '-u'])
|
||||
# Install grub in mbr
|
||||
log_check_call(['/usr/sbin/grub-install', '--boot-directory='+info.root+"/boot/", info.bootstrap_device['path']])
|
||||
|
||||
log_check_call(['/usr/sbin/grub-install', '--boot-directory=' + info.root + "/boot/",
|
||||
info.bootstrap_device['path']])
|
||||
log_check_call(['/usr/sbin/chroot', info.root, '/usr/sbin/update-grub'])
|
||||
|
|
Loading…
Add table
Reference in a new issue