/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to breezy/export_pot.py

  • Committer: Jelmer Vernooij
  • Date: 2020-02-13 23:57:28 UTC
  • mfrom: (7490 work)
  • mto: This revision was merged to the branch mainline in revision 7492.
  • Revision ID: jelmer@jelmer.uk-20200213235728-m6ds0mm3mbs4y182
Merge trunk.

Show diffs side-by-side

added added

removed removed

Lines of Context:
30
30
 
31
31
import inspect
32
32
import os
 
33
import sys
33
34
 
34
35
import breezy
35
36
from . import (
86
87
            # string terminates on. It's more useful to have the line the
87
88
            # string begins on. Unfortunately, counting back newlines is
88
89
            # only an approximation as the AST is ignorant of escaping.
89
 
            str_to_lineno[node.s] = node.lineno - node.s.count('\n')
 
90
            str_to_lineno[node.s] = node.lineno - (0 if sys.version_info >= (3, 8) else node.s.count('\n'))
90
91
    return cls_to_lineno, str_to_lineno
91
92
 
92
93