Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
pymilter
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Container registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
misc
pymilter
Commits
09582a2e
Commit
09582a2e
authored
Jun 14, 2005
by
Stuart Gathman
Browse files
Options
Downloads
Patches
Plain Diff
fix pychecker nits
parent
7eb2fb09
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
spf.py
+7
-5
7 additions, 5 deletions
spf.py
with
7 additions
and
5 deletions
spf.py
+
7
−
5
View file @
09582a2e
...
@@ -46,6 +46,9 @@ For news, bugfixes, etc. visit the home page for this implementation at
...
@@ -46,6 +46,9 @@ For news, bugfixes, etc. visit the home page for this implementation at
# Terrence is not responding to email.
# Terrence is not responding to email.
#
#
# $Log$
# $Log$
# Revision 1.4 2005/06/02 04:18:55 customdesigned
# Update copyright notices after reading article on /.
#
# Revision 1.3 2005/06/02 02:08:12 customdesigned
# Revision 1.3 2005/06/02 02:08:12 customdesigned
# Reject on PermErr
# Reject on PermErr
#
#
...
@@ -684,12 +687,11 @@ class query(object):
...
@@ -684,12 +687,11 @@ class query(object):
p
=
CIDParser
(
q
=
self
)
p
=
CIDParser
(
q
=
self
)
try
:
try
:
return
p
.
spf_txt
(
domain
)
return
p
.
spf_txt
(
domain
)
except
xml
.
sax
.
_exceptions
.
SAXParseException
,
x
:
except
xml
.
sax
.
_exceptions
.
SAXParseException
:
raise
PermError
(
"
Caller-ID parse error
"
,
domain
)
raise
PermError
(
"
Caller-ID parse error
"
,
domain
)
if
len
(
a
)
==
1
:
if
len
(
a
)
==
1
:
return
a
[
0
]
return
a
[
0
]
else
:
return
None
return
None
def
dns_txt
(
self
,
domainname
):
def
dns_txt
(
self
,
domainname
):
...
@@ -974,12 +976,12 @@ def bin2addr(addr):
...
@@ -974,12 +976,12 @@ def bin2addr(addr):
def
expand_one
(
expansion
,
str
,
joiner
):
def
expand_one
(
expansion
,
str
,
joiner
):
if
not
str
:
if
not
str
:
return
expansion
return
expansion
l
e
n
,
reverse
,
delimiters
=
RE_ARGS
.
split
(
str
)[
1
:
4
]
ln
,
reverse
,
delimiters
=
RE_ARGS
.
split
(
str
)[
1
:
4
]
if
not
delimiters
:
if
not
delimiters
:
delimiters
=
'
.
'
delimiters
=
'
.
'
expansion
=
split
(
expansion
,
delimiters
,
joiner
)
expansion
=
split
(
expansion
,
delimiters
,
joiner
)
if
reverse
:
expansion
.
reverse
()
if
reverse
:
expansion
.
reverse
()
if
l
e
n
:
expansion
=
expansion
[
-
int
(
l
e
n
)
*
2
+
1
:]
if
ln
:
expansion
=
expansion
[
-
int
(
ln
)
*
2
+
1
:]
return
''
.
join
(
expansion
)
return
''
.
join
(
expansion
)
def
split
(
str
,
delimiters
,
joiner
=
None
):
def
split
(
str
,
delimiters
,
joiner
=
None
):
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
sign in
to comment