# Buggy code
def AddStorageMediaImageOptions(self, argument_group):
    """Adds the storage media image options to the argument group.

    Args:
      argument_group: The argparse argument group (instance of
                      argparse._ArgumentGroup).
    """
    argument_group.add_argument(
        "--partition",
        dest="partition_number",
        action="store",
        type=int,
        default=None,
        help=(
            "Choose a partition number from a disk image. This partition "
            "number should correspond to the partion number on the disk "
            "image, starting from partition 1."
        ),
    )

    argument_group.add_argument(
        "-o",
        "--offset",
        dest="image_offset",
        action="store",
        default=None,
        type=int,
        help=(
            "The offset of the volume within the storage media image in "
            "number of sectors. A sector is {0:d} bytes in size by default "
            "this can be overwritten with the --sector_size option."
        ).format(self._DEFAULT_BYTES_PER_SECTOR),
    )

    argument_group.add_argument(
        "--sector_size",
        "--sector-size",
        dest="bytes_per_sector",
        action="store",
        type=int,
        default=self._DEFAULT_BYTES_PER_SECTOR,
        help=("The number of bytes per sector, which is {0:s} by default.").format(
            self._DEFAULT_BYTES_PER_SECTOR
        ),
    )

    argument_group.add_argument(
        "--ob",
        "--offset_bytes",
        "--offset_bytes",
        dest="image_offset_bytes",
        action="store",
        default=None,
        type=int,
        help=(
            "The offset of the volume within the storage media image in "
            "number of bytes."
        ),
    )


# Traceback (ValueError)
Traceback (most recent call last):
File "/usr/local/bin/log2timeline.py", line 5, in <module>
pkg_resources.run_script('plaso==1.2.1-20150416', 'log2timeline.py')
File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 528, in run_script
self.require(requires)[0].run_script(script_name, ns)
File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 1401, in run_script
exec(script_code, namespace, namespace)
File "/usr/local/lib/python2.7/dist-packages/plaso-1.2.1_20150416-py2.7.egg/EGG-INFO/scripts/log2timeline.py", line 470, in <module>

File "/usr/local/lib/python2.7/dist-packages/plaso-1.2.1_20150416-py2.7.egg/EGG-INFO/scripts/log2timeline.py", line 433, in Main

File "/usr/local/lib/python2.7/dist-packages/plaso-1.2.1_20150416-py2.7.egg/EGG-INFO/scripts/log2timeline.py", line 214, in ParseArguments

File "build/bdist.linux-x86_64/egg/plaso/cli/storage_media_tool.py", line 135, in AddStorageMediaImageOptions
ValueError: Unknown format code 's' for object of type 'int'

# Fixed code
def AddStorageMediaImageOptions(self, argument_group):
    """Adds the storage media image options to the argument group.

    Args:
      argument_group: The argparse argument group (instance of
                      argparse._ArgumentGroup).
    """
    argument_group.add_argument(
        "--partition",
        dest="partition_number",
        action="store",
        type=int,
        default=None,
        help=(
            "Choose a partition number from a disk image. This partition "
            "number should correspond to the partion number on the disk "
            "image, starting from partition 1."
        ),
    )

    argument_group.add_argument(
        "-o",
        "--offset",
        dest="image_offset",
        action="store",
        default=None,
        type=int,
        help=(
            "The offset of the volume within the storage media image in "
            "number of sectors. A sector is {0:d} bytes in size by default "
            "this can be overwritten with the --sector_size option."
        ).format(self._DEFAULT_BYTES_PER_SECTOR),
    )

    argument_group.add_argument(
        "--sector_size",
        "--sector-size",
        dest="bytes_per_sector",
        action="store",
        type=int,
        default=self._DEFAULT_BYTES_PER_SECTOR,
        help=("The number of bytes per sector, which is {0:d} by default.").format(
            self._DEFAULT_BYTES_PER_SECTOR
        ),
    )

    argument_group.add_argument(
        "--ob",
        "--offset_bytes",
        "--offset_bytes",
        dest="image_offset_bytes",
        action="store",
        default=None,
        type=int,
        help=(
            "The offset of the volume within the storage media image in "
            "number of bytes."
        ),
    )