prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  Replying to comments in quarantined subreddits returns an empty object
  I have a bot that fetches comment ids from pushshift, then does some work and replies to the comment. If the comment is in a quarantined subreddit that I have not clicked through the quarantine warning for, I get the following error.
  
  ```
  praw/models/reddit/mixins/replyable.py", line 26, in reply
      return self._reddit.post(API_PATH["comment"], data=data)[0]
  IndexError: list index out of range
  ```
  The reply call succeeds, returning a valid http code and the following json
  ```
  {'json': {'errors': [], 'data': {'things': []}}}
  ```
  `objector.objectify` fails to parse this and returns an empty array. Importantly, the comment is successfully created.
  
  I'm not really sure what should happen in this case, but I do think it should be a more clear error message. Happy to put together a pull request if anyone has any ideas.
  
  </issue>
  <code>
  [start of praw/models/reddit/mixins/replyable.py]
  1 """Provide the ReplyableMixin class."""
  2 from ....const import API_PATH
  3 
  4 
  5 class ReplyableMixin:
  6     """Interface for RedditBase classes that can be replied to."""
  7 
  8     def reply(self, body):
  9         """Reply to the object.
  10 
  11         :param body: The markdown formatted content for a comment.
  12         :returns: A :class:`~.Comment` object for the newly created comment.
  13 
  14         Example usage:
  15 
  16         .. code:: python
  17 
  18            submission = reddit.submission(id='5or86n')
  19            submission.reply('reply')
  20 
  21            comment = reddit.comment(id='dxolpyc')
  22            comment.reply('reply')
  23 
  24         """
  25         data = {"text": body, "thing_id": self.fullname}
  26         return self._reddit.post(API_PATH["comment"], data=data)[0]
  27
  [end of praw/models/reddit/mixins/replyable.py]
  </code>
  
  I need you to solve this issue by generating a single patch file that I can apply directly to this repository using git apply. Please respond with a single patch file in the following format.
  <patch>
  diff --git a/file.py b/file.py
  --- a/file.py
  +++ b/file.py
  @@ -1,27 +1,35 @@
   def euclidean(a, b):
  -    while b:
  -        a, b = b, a % b
  -    return a
  +    if b == 0:
  +        return a
  +    return euclidean(b, a % b)
   
   
   def bresenham(x0, y0, x1, y1):
       points = []
       dx = abs(x1 - x0)
       dy = abs(y1 - y0)
  -    sx = 1 if x0 < x1 else -1
  -    sy = 1 if y0 < y1 else -1
  -    err = dx - dy
  +    x, y = x0, y0
  +    sx = -1 if x0 > x1 else 1
  +    sy = -1 if y0 > y1 else 1
   
  -    while True:
  -        points.append((x0, y0))
  -        if x0 == x1 and y0 == y1:
  -            break
  -        e2 = 2 * err
  -        if e2 > -dy:
  -            err -= dy
  -            x0 += sx
  -        if e2 < dx:
  -            err += dx
  -            y0 += sy
  +    if dx > dy:
  +        err = dx / 2.0
  +        while x != x1:
  +            points.append((x, y))
  +            err -= dy
  +            if err < 0:
  +                y += sy
  +                err += dx
  +            x += sx
  +    else:
  +        err = dy / 2.0
  +        while y != y1:
  +            points.append((x, y))
  +            err -= dx
  +            if err < 0:
  +                x += sx
  +                err += dy
  +            y += sy
  +
  +    points.append((x, y))
       return points
  
  </patch>
golden_diff: diff --git a/praw/models/reddit/mixins/replyable.py b/praw/models/reddit/mixins/replyable.py
  --- a/praw/models/reddit/mixins/replyable.py
  +++ b/praw/models/reddit/mixins/replyable.py
  @@ -9,7 +9,14 @@
           """Reply to the object.
   
           :param body: The markdown formatted content for a comment.
  -        :returns: A :class:`~.Comment` object for the newly created comment.
  +        :returns: A :class:`~.Comment` object for the newly created
  +            comment or ``None`` if Reddit doesn't provide one.
  +
  +        A ``None`` value can be returned if the target is a comment or
  +        submission in a quarantined subreddit and the authenticated user
  +        has not opt-ed in to viewing the content. When this happens the
  +        comment will be sucessfully created on Reddit and can be retried
  +        by drawing the comment from the user's comment history.
   
           Example usage:
   
  @@ -23,4 +30,8 @@
   
           """
           data = {"text": body, "thing_id": self.fullname}
  -        return self._reddit.post(API_PATH["comment"], data=data)[0]
  +        comments = self._reddit.post(API_PATH["comment"], data=data)
  +        try:
  +            return comments[0]
  +        except IndexError:
  +            return None
  
verification_info: {"golden_diff": "diff --git a/praw/models/reddit/mixins/replyable.py b/praw/models/reddit/mixins/replyable.py\n--- a/praw/models/reddit/mixins/replyable.py\n+++ b/praw/models/reddit/mixins/replyable.py\n@@ -9,7 +9,14 @@\n         \"\"\"Reply to the object.\n \n         :param body: The markdown formatted content for a comment.\n-        :returns: A :class:`~.Comment` object for the newly created comment.\n+        :returns: A :class:`~.Comment` object for the newly created\n+            comment or ``None`` if Reddit doesn't provide one.\n+\n+        A ``None`` value can be returned if the target is a comment or\n+        submission in a quarantined subreddit and the authenticated user\n+        has not opt-ed in to viewing the content. When this happens the\n+        comment will be sucessfully created on Reddit and can be retried\n+        by drawing the comment from the user's comment history.\n \n         Example usage:\n \n@@ -23,4 +30,8 @@\n \n         \"\"\"\n         data = {\"text\": body, \"thing_id\": self.fullname}\n-        return self._reddit.post(API_PATH[\"comment\"], data=data)[0]\n+        comments = self._reddit.post(API_PATH[\"comment\"], data=data)\n+        try:\n+            return comments[0]\n+        except IndexError:\n+            return None\n", "issue": "Replying to comments in quarantined subreddits returns an empty object\nI have a bot that fetches comment ids from pushshift, then does some work and replies to the comment. If the comment is in a quarantined subreddit that I have not clicked through the quarantine warning for, I get the following error.\r\n\r\n```\r\npraw/models/reddit/mixins/replyable.py\", line 26, in reply\r\n    return self._reddit.post(API_PATH[\"comment\"], data=data)[0]\r\nIndexError: list index out of range\r\n```\r\nThe reply call succeeds, returning a valid http code and the following json\r\n```\r\n{'json': {'errors': [], 'data': {'things': []}}}\r\n```\r\n`objector.objectify` fails to parse this and returns an empty array. Importantly, the comment is successfully created.\r\n\r\nI'm not really sure what should happen in this case, but I do think it should be a more clear error message. Happy to put together a pull request if anyone has any ideas.\n", "before_files": [{"content": "\"\"\"Provide the ReplyableMixin class.\"\"\"\nfrom ....const import API_PATH\n\n\nclass ReplyableMixin:\n    \"\"\"Interface for RedditBase classes that can be replied to.\"\"\"\n\n    def reply(self, body):\n        \"\"\"Reply to the object.\n\n        :param body: The markdown formatted content for a comment.\n        :returns: A :class:`~.Comment` object for the newly created comment.\n\n        Example usage:\n\n        .. code:: python\n\n           submission = reddit.submission(id='5or86n')\n           submission.reply('reply')\n\n           comment = reddit.comment(id='dxolpyc')\n           comment.reply('reply')\n\n        \"\"\"\n        data = {\"text\": body, \"thing_id\": self.fullname}\n        return self._reddit.post(API_PATH[\"comment\"], data=data)[0]\n", "path": "praw/models/reddit/mixins/replyable.py"}]}