No description
  • Python 74.6%
  • Roff 17.3%
  • C 8.1%
Find a file
??? 04b9f552f4 [PATCH] invalid "-K" value cause smem ended with IndexError exception
I do "smem -w -K a.txt -R 2048M" and got following error:
zhichyu@w-shpd-zcyu:~/sftw4ubuntu$ smem-0.1/smem -w -K a.txt -R 2048M
size: 'a.txt': No such file
Traceback (most recent call last):
  File "smem-0.1/smem", line 607, in <module>
    showsystem()
  File "smem-0.1/smem", line 361, in showsystem
    k = kernelsize()
  File "smem-0.1/smem", line 77, in kernelsize
    d = os.popen("size %s" % options.kernel).readlines()[1]
IndexError: list index out of range

The root cause is that os.popen("size a.txt") returns only one line.
If the user provides an invalid kernel image file path, I think it's
better to assume the image size is zero than raise an exception.
2009-05-14 22:22:44 -05:00
capture Add reading from alternate directory and tarball and example capture script 2009-04-06 22:48:01 -07:00
COPYING Add GPLv2+ license and copyright notice 2009-04-30 11:57:52 -05:00
smem [PATCH] invalid "-K" value cause smem ended with IndexError exception 2009-05-14 22:22:44 -05:00