~tomasgroth/openlp/portable-path

« back to all changes in this revision

Viewing changes to openlp/plugins/songs/lib/importers/presentationmanager.py

  • Committer: Tomas Groth
  • Date: 2018-07-07 06:45:39 UTC
  • mfrom: (2821.1.7 pycodestyle)
  • Revision ID: tomasgroth@yahoo.dk-20180707064539-5q0enwn43pbjou3v
Fix pep8 and pylint errors detected by new version.

Show diffs side-by-side

added added

removed removed

Lines of Context:
51
51
                encoding = get_file_encoding(file_path)['encoding']
52
52
                # Open file with detected encoding and remove encoding declaration
53
53
                text = file_path.read_text(encoding=encoding)
54
 
                text = re.sub('.+\?>\n', '', text)
 
54
                text = re.sub(r'.+\?>\n', '', text)
55
55
                try:
56
56
                    tree = etree.fromstring(text, parser=etree.XMLParser(recover=True))
57
57
                except ValueError: