Skip to content

Commit

Permalink
Confluence publishing uses correct text types (pantsbuild#7746)
Browse files Browse the repository at this point in the history
Without this change, actually publishing to Confluence fails with encoding errors.

Specifically:
user needs converting because xmlrpclib hard-codes what kinds it can encode, and doesn't count future's newstr.
url needs converting because it's detected as a newbytes which has its `encode` disabled. Maybe this should instead be calling `binary_type(...).encode("utf-8")`?
  • Loading branch information
illicitonion authored May 17, 2019
1 parent ab95c36 commit 13bc06d
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,11 @@ def prepare(cls, options, round_manager):
def __init__(self, *args, **kwargs):
super(ConfluencePublish, self).__init__(*args, **kwargs)

self.url = self.get_options().url
self.url = str(self.get_options().url)
self.force = self.get_options().force
self.open = self.get_options().open
self._wiki = None
self.user = self.get_options().user
self.user = str(self.get_options().user)

def wiki(self):
raise NotImplementedError('Subclasses must provide the wiki target they are associated with')
Expand Down

0 comments on commit 13bc06d

Please sign in to comment.