~mailman-coders/mailman/2.1

« back to all changes in this revision

Viewing changes to misc/paths.py.in

  • Committer: Mark Sapiro
  • Date: 2021-11-22 04:31:11 UTC
  • Revision ID: mark@msapiro.net-20211122043111-v9n55ud4tk337ks6
Avoid NotAMemberError in CSRF check from user options page.

Show diffs side-by-side

added added

removed removed

Lines of Context:
67
67
                       'dist-packages')
68
68
sys.path.append(distdir)
69
69
 
 
70
# Some distros may have the python library in a directory other than lib/
 
71
# such as Lib/ or lib64/.  Hopefully they will have hacked
 
72
# site.getsitepackages() to return the right thing.
 
73
try:
 
74
    import site
 
75
    sys.path.extend(site.getsitepackages())
 
76
    del site
 
77
except (ImportError, AttributeError):
 
78
    pass
 
79
 
70
80
 
71
81
# In a normal interactive Python environment, the japanese.pth and korean.pth
72
82
# files would be imported automatically.  But because we inhibit the importing