Skip to content

Commit

Permalink
Remove whitespace errors
Browse files Browse the repository at this point in the history
  • Loading branch information
h3h committed Mar 13, 2021
1 parent 0875ba4 commit 5c1baec
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions destalinator.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ def __init__(self, slacker, slackbot, activated):
`activated` is a boolean indicating whether destalinator should do dry
runs or real runs
"""
self.closure_text = utils.get_local_file_content( self.closure_text_fname)
self.warning_text = utils.get_local_file_content( self.warning_text_fname)
self.closure_text = utils.get_local_file_content(self.closure_text_fname)
self.warning_text = utils.get_local_file_content(self.warning_text_fname)
self.slacker = slacker
self.slackbot = slackbot

Expand Down Expand Up @@ -105,7 +105,7 @@ def ignore_channel(self, channel_name):
return False

def post_marked_up_message(self, channel_name, message, **kwargs):
self.slacker.post_message( channel_name, self.add_slack_channel_markup(message), **kwargs)
self.slacker.post_message(channel_name, self.add_slack_channel_markup(message), **kwargs)

def stale(self, channel_name, days):
"""
Expand Down Expand Up @@ -143,7 +143,7 @@ def archive(self, channel_name):
"""Archive the given channel name, returning the Slack API response as a JSON string."""
# Might not need to do this since we now do this in `stale`
if self.ignore_channel(channel_name):
self.logger.debug( "Not archiving #%s because it's in ignore_channels", channel_name)
self.logger.debug("Not archiving #%s because it's in ignore_channels", channel_name)
return

if self.config.activated:
Expand All @@ -163,7 +163,7 @@ def archive(self, channel_name):
else:
error = payload.get('error', '!! No error found in payload %s !!' % payload)
url = "https://api.slack.com/methods/conversations.archive"
self.logger.error("Failed to archive %s: %s. See "+ url +" for more context.", channel_name, error)
self.logger.error("Failed to archive %s: %s. See " + url + " for more context.", channel_name, error)

return payload

Expand Down Expand Up @@ -248,5 +248,5 @@ def warn_in_general(self, stale_channels):
message += ", ".join(["#" + x for x in stale_channels])
message = message.format(channel, being, there)
if self.config.activated:
self.post_marked_up_message( self.config.general_message_channel, message, message_type='warn_in_general')
self.post_marked_up_message(self.config.general_message_channel, message, message_type='warn_in_general')
self.logger.debug("Notified #%s with: %s", self.config.general_message_channel, message)

0 comments on commit 5c1baec

Please sign in to comment.