This file is indexed.

/usr/lib/python2.7/dist-packages/mcomix/archive/lha_external.py is in mcomix 1.2.1-1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
# -*- coding: utf-8 -*-

""" LHA archive extractor. """

import re

from mcomix import process
from mcomix.archive import archive_base

# Filled on-demand by LhaArchive
_lha_executable = -1

class LhaArchive(archive_base.ExternalExecutableArchive):
    """ LHA file extractor using the lha executable. """

    def _get_executable(self):
        return LhaArchive._find_lha_executable()

    def _get_list_arguments(self):
        return [u'l', u'-g', u'-q2']

    def _get_extract_arguments(self):
        return [u'p', u'-q2']

    def _parse_list_output_line(self, line):
        match = re.search(r'\[generic\]\s+\d+\s+\S+?\s+\w+\s+\d+\s+\d+\s+(.+)$', line)
        if match:
            return match.group(1)
        else:
            return None

    @staticmethod
    def _find_lha_executable():
        """ Tries to start lha, and returns either 'lha' if
        it was started successfully or None otherwise. """
        global _lha_executable
        if _lha_executable == -1:
            _lha_executable = process.find_executable((u'lha',))
        return _lha_executable

    @staticmethod
    def is_available():
        return bool(LhaArchive._find_lha_executable())


# vim: expandtab:sw=4:ts=4