plone.api/read_only_second_approach: apply @hvelarde recommendations

Alexander Loechel <jenkins-z4DKO/[email protected]>
Newsgroups gmane.comp.web.zope.plone.cvs
Message-ID <[email protected]>
Repository: plone.api
Branch: refs/heads/read_only_second_approach
Date: 2017-07-20T17:42:27+02:00
Author: Alexander Loechel (loechel) <[email protected]>
Commit: https://github.com/plone/plone.api/commit/1f35700f4420b5bc42f176df92b4c16c93600c0b

apply @hvelarde recommendations

Files changed:
M docs/env.rst
M src/plone/api/env.py

diff --git a/docs/env.rst b/docs/env.rst
index fb50b69..1b8f846 100644
--- a/docs/env.rst
+++ b/docs/env.rst
@@ -119,8 +119,8 @@ Therefore you could adjust the UI to prevent create, delete or update pages are
     from plone import api
 
     is_read_only = api.env.read_only_mode()
-        if is_read_only:
-                  pass  # do something
+    if is_read_only:
+        pass  # do something
 
 
 .. _env_plone_version_example:
diff --git a/src/plone/api/env.py b/src/plone/api/env.py
index 32d81fb..fb5a6bb 100644
--- a/src/plone/api/env.py
+++ b/src/plone/api/env.py
@@ -203,8 +203,9 @@ def test_mode():
 
 
 def read_only_mode():
-    """Returns True if you are running the zope instance on an read only ZODB.
+    """Check if the Zope instance is running an a read-only ZODB.
 
+    :returns: bool isReadOnly True if ZODB is read-only
     :Example: :ref:`env_read_only_mode_example`
     """
     isReadOnly = True



------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.