summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEd Bartosh <ed.bartosh@linux.intel.com>2016-05-04 16:06:22 +0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-05-14 23:05:13 +0100
commitb6b5b5e29531be4eb77f1756b78a7b9a5292bcb4 (patch)
tree29589e73e77e4c7d23fb91c0e07b0310040ddf9e
parent5fedb5d3cc8d6ff9e9e378bbda45345a6b867cd4 (diff)
downloadpoky-b6b5b5e29531be4eb77f1756b78a7b9a5292bcb4.tar.gz
wic: don't use L suffix for integers
This suffix is not supported by Python 3. Wic code works without it on Python 2 too, so it's safe to remove it. [YOCTO #9412] (From OE-Core rev: 296db7e33bd71585cac63dc78c2c95bc619b4a86) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--scripts/lib/wic/ksparser.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/scripts/lib/wic/ksparser.py b/scripts/lib/wic/ksparser.py
index 27bc1c7ee4..6887a7d024 100644
--- a/scripts/lib/wic/ksparser.py
+++ b/scripts/lib/wic/ksparser.py
@@ -51,7 +51,7 @@ def sizetype(arg):
51 Converts size string in <num>[K|k|M|G] format into the integer value 51 Converts size string in <num>[K|k|M|G] format into the integer value
52 """ 52 """
53 if arg.isdigit(): 53 if arg.isdigit():
54 return int(arg) * 1024L 54 return int(arg) * 1024
55 55
56 if not arg[:-1].isdigit(): 56 if not arg[:-1].isdigit():
57 raise ArgumentTypeError("Invalid size: %r" % arg) 57 raise ArgumentTypeError("Invalid size: %r" % arg)
@@ -60,9 +60,9 @@ def sizetype(arg):
60 if arg.endswith("k") or arg.endswith("K"): 60 if arg.endswith("k") or arg.endswith("K"):
61 return size 61 return size
62 if arg.endswith("M"): 62 if arg.endswith("M"):
63 return size * 1024L 63 return size * 1024
64 if arg.endswith("G"): 64 if arg.endswith("G"):
65 return size * 1024L * 1024L 65 return size * 1024 * 1024
66 66
67 raise ArgumentTypeError("Invalid size: %r" % arg) 67 raise ArgumentTypeError("Invalid size: %r" % arg)
68 68
@@ -127,7 +127,7 @@ class KickStart():
127 part.add_argument('mountpoint') 127 part.add_argument('mountpoint')
128 part.add_argument('--active', action='store_true') 128 part.add_argument('--active', action='store_true')
129 part.add_argument('--align', type=int) 129 part.add_argument('--align', type=int)
130 part.add_argument("--extra-space", type=sizetype, default=10*1024L) 130 part.add_argument("--extra-space", type=sizetype, default=10*1024)
131 part.add_argument('--fsoptions', dest='fsopts') 131 part.add_argument('--fsoptions', dest='fsopts')
132 part.add_argument('--fstype') 132 part.add_argument('--fstype')
133 part.add_argument('--label') 133 part.add_argument('--label')