projects
/
grml2usb.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
d1fb7f0
)
pep8 cleanups
author
Michael Prokop
<mika@grml.org>
Mon, 19 Aug 2013 11:15:53 +0000
(13:15 +0200)
committer
Michael Prokop
<mika@grml.org>
Mon, 19 Aug 2013 11:15:53 +0000
(13:15 +0200)
Makefile
patch
|
blob
|
history
grml2usb
patch
|
blob
|
history
diff --git
a/Makefile
b/Makefile
index
9ed8a8a
..
5d3a052
100644
(file)
--- a/
Makefile
+++ b/
Makefile
@@
-48,7
+48,6
@@
tarball: all
prepare-release:
./tarball.sh --no-gpg
prepare-release:
./tarball.sh --no-gpg
-
clean:
rm -rf grml2usb.8.html grml2usb.8.xml grml2usb.8
rm -rf grml2iso.8.html grml2iso.8.xml grml2iso.8
clean:
rm -rf grml2usb.8.html grml2usb.8.xml grml2usb.8
rm -rf grml2iso.8.html grml2iso.8.xml grml2iso.8
@@
-59,6
+58,7
@@
codecheck:
pylint --include-ids=y --max-line-length=120 grml2usb
# pylint --include-ids=y --disable-msg-cat=C0301 --disable-msg-cat=W0511 grml2usb
# pylint --reports=n --include-ids=y --disable-msg-cat=C0301 grml2usb
pylint --include-ids=y --max-line-length=120 grml2usb
# pylint --include-ids=y --disable-msg-cat=C0301 --disable-msg-cat=W0511 grml2usb
# pylint --reports=n --include-ids=y --disable-msg-cat=C0301 grml2usb
+ pep8 --repeat --ignore E125,E126,E127,E128,E501 grml2usb
# graph:
# sudo pycallgraph grml2usb /grml/isos/grml-small_2008.11.iso /dev/sdb1
# graph:
# sudo pycallgraph grml2usb /grml/isos/grml-small_2008.11.iso /dev/sdb1
diff --git
a/grml2usb
b/grml2usb
index
eafee4b
..
4e958b5
100755
(executable)
--- a/
grml2usb
+++ b/
grml2usb
@@
-40,12
+40,13
@@
GRML_FLAVOURS = set() # which flavours are being installed?
GRML_DEFAULT = None
UUID = None
SYSLINUX_LIBS = "/usr/lib/syslinux/"
GRML_DEFAULT = None
UUID = None
SYSLINUX_LIBS = "/usr/lib/syslinux/"
-GPT_HEADER = "\x55\xaa\x45\x46\x49\x20\x50\x41\x52\x54" # original GPT header
+GPT_HEADER = "\x55\xaa\x45\x46\x49\x20\x50\x41\x52\x54"
# original GPT header
RE_PARTITION = re.compile(r'([a-z/]*?)(\d+)$')
RE_P_PARTITION = re.compile(r'(.*?\d+)p(\d+)$')
RE_LOOP_DEVICE = re.compile(r'/dev/loop\d+$')
RE_PARTITION = re.compile(r'([a-z/]*?)(\d+)$')
RE_P_PARTITION = re.compile(r'(.*?\d+)p(\d+)$')
RE_LOOP_DEVICE = re.compile(r'/dev/loop\d+$')
+
def syslinux_warning(option, opt, value, opt_parser):
"""A helper function for printing a warning about deprecated option
"""
def syslinux_warning(option, opt, value, opt_parser):
"""A helper function for printing a warning about deprecated option
"""
@@
-132,6
+133,7
@@
class CriticalException(Exception):
@Exception: message"""
pass
@Exception: message"""
pass
+
class VerifyException(Exception):
"""Throw critical exception if there is an fatal error when verifying something.
class VerifyException(Exception):
"""Throw critical exception if there is an fatal error when verifying something.
@@
-287,7
+289,7
@@
def search_file(filename, search_path='/bin' + os.pathsep + '/usr/bin', lst_retu
@cwd: current working directory
"""
@cwd: current working directory
"""
- return
os.path.exists(os.path.join(cwd, filename))
+ return os.path.exists(os.path.join(cwd, filename))
for path in paths:
current_dir = path
for path in paths:
current_dir = path
@@
-801,8
+803,7
@@
def copy_system_files(grml_flavour, iso_mount, target):
squashfs = search_file(grml_flavour + '.squashfs', iso_mount)
if squashfs is None:
logging.error("error locating squashfs file")
squashfs = search_file(grml_flavour + '.squashfs', iso_mount)
if squashfs is None:
logging.error("error locating squashfs file")
- raise CriticalException("squashfs file not found"
- ", please check that your iso is not corrupt")
+ raise CriticalException("squashfs file not found, please check that your iso is not corrupt")
else:
squashfs_target = target + '/live/' + grml_flavour + '/'
execute(mkdir, squashfs_target)
else:
squashfs_target = target + '/live/' + grml_flavour + '/'
execute(mkdir, squashfs_target)