From 6e69c1447a736aa45f3518259a4822d2692b4008 Mon Sep 17 00:00:00 2001 From: Eklavya Sharma Date: Thu, 10 Mar 2016 22:43:01 +0530 Subject: [PATCH] Apply Python 3 futurize transform libmodernize.fixes.fix_basestring Refer to #256 --- integrations/basecamp/zulip_basecamp_mirror | 4 +++- integrations/codebase/zulip_codebase_mirror | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/integrations/basecamp/zulip_basecamp_mirror b/integrations/basecamp/zulip_basecamp_mirror index eaa7652..54e0044 100755 --- a/integrations/basecamp/zulip_basecamp_mirror +++ b/integrations/basecamp/zulip_basecamp_mirror @@ -26,6 +26,7 @@ # or preferably on a server. # You may need to install the python-requests library. +from __future__ import absolute_import import requests import logging import time @@ -34,6 +35,7 @@ import sys import os from datetime import datetime, timedelta from HTMLParser import HTMLParser +import six sys.path.insert(0, os.path.dirname(__file__)) import zulip_basecamp_config as config @@ -170,7 +172,7 @@ def run_mirror(): if __name__ == "__main__": - if not isinstance(config.RESUME_FILE, basestring): + if not isinstance(config.RESUME_FILE, six.string_types): sys.stderr("RESUME_FILE path not given; refusing to continue") check_permissions() if config.LOG_FILE: diff --git a/integrations/codebase/zulip_codebase_mirror b/integrations/codebase/zulip_codebase_mirror index 10c487d..17e1b52 100755 --- a/integrations/codebase/zulip_codebase_mirror +++ b/integrations/codebase/zulip_codebase_mirror @@ -30,6 +30,7 @@ # python-dateutil is a dependency for this script. from __future__ import print_function +from __future__ import absolute_import import requests import logging import time @@ -37,6 +38,7 @@ import sys import os from datetime import datetime, timedelta +import six try: @@ -315,7 +317,7 @@ def check_permissions(): sys.stderr(e) if __name__ == "__main__": - if not isinstance(config.RESUME_FILE, basestring): + if not isinstance(config.RESUME_FILE, six.string_types): sys.stderr("RESUME_FILE path not given; refusing to continue") check_permissions() if config.LOG_FILE: