PEP8-ify things.

This commit is contained in:
Anders Ingemann 2013-08-17 17:28:46 +02:00
parent e1fc5ea972
commit b5c5acf5b1
12 changed files with 38 additions and 27 deletions

12
CONTRIBUTING.md Normal file
View 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

View file

@ -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'])