Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
Zope
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
Zope
Commits
676bb9c5
Commit
676bb9c5
authored
Sep 09, 2007
by
Andreas Jung
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
catching exception in queueLength() if the configured
queue directory causes an error
parent
9747ecc5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
2 deletions
+9
-2
lib/python/Products/MailHost/MailHost.py
lib/python/Products/MailHost/MailHost.py
+9
-2
No files found.
lib/python/Products/MailHost/MailHost.py
View file @
676bb9c5
...
@@ -95,6 +95,9 @@ class MailBase(Acquisition.Implicit, OFS.SimpleItem.Item, RoleManager):
...
@@ -95,6 +95,9 @@ class MailBase(Acquisition.Implicit, OFS.SimpleItem.Item, RoleManager):
+
OFS
.
SimpleItem
.
Item
.
manage_options
+
OFS
.
SimpleItem
.
Item
.
manage_options
)
)
def
__setstate__
(
self
,
state
):
import
pdb
;
pdb
.
set_trace
()
def
__init__
(
self
,
id
=
''
,
title
=
''
,
smtp_host
=
'localhost'
,
smtp_port
=
25
,
def
__init__
(
self
,
id
=
''
,
title
=
''
,
smtp_host
=
'localhost'
,
smtp_port
=
25
,
force_tls
=
False
,
force_tls
=
False
,
...
@@ -232,8 +235,12 @@ class MailBase(Acquisition.Implicit, OFS.SimpleItem.Item, RoleManager):
...
@@ -232,8 +235,12 @@ class MailBase(Acquisition.Implicit, OFS.SimpleItem.Item, RoleManager):
def
queueLength
(
self
):
def
queueLength
(
self
):
""" return length of mail queue """
""" return length of mail queue """
maildir
=
Maildir
(
self
.
smtp_queue_directory
)
try
:
return
len
([
item
for
item
in
maildir
])
maildir
=
Maildir
(
self
.
smtp_queue_directory
)
return
len
([
item
for
item
in
maildir
])
except
ValueError
:
return
'n/a - %s is not a maildir - please verify your '
\
'configuration'
%
self
.
smtp_queue_directory
security
.
declareProtected
(
view
,
'queueThreadAlive'
)
security
.
declareProtected
(
view
,
'queueThreadAlive'
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment