def plugin_loaded():
    if need_package_control_upgrade:
        sublime.error_message(u'SFTP\n\nThe SFTP package seems to have been ' + \
            u'installed using an older version of Package Control. Please ' + \
            u'remove the SFTP package, upgrade Package Control to 2.0.0 ' + \
            u'and then reinstall SFTP.\n\nIt may be necessary to delete ' + \
            u'the "Packages/Package Control/" folder and then follow the ' + \
            u'instructions at https://sublime.wbond.net/installation to ' + \
            u'properly upgrade Package Control.')
        return

    settings = sublime.load_settings('SFTP.sublime-settings')

    try:
        # This won't be defined if the wrong version is installed
        sftp_debug.set_debug(settings.get('debug', False))
    except (NameError):
        pass

    bin_folder = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'bin')
    has_bin = os.path.exists(bin_folder)
    psftp_exe = os.path.join(bin_folder, 'psftp.exe')
    has_psftp = os.path.exists(psftp_exe)
    if os.name == 'nt' and (not has_bin or not has_psftp):
        sublime.error_message(u'SFTP\n\nThe SFTP package seems to have been ' + \
            u'synced or copied from an OS X or Linux machine. The Windows ' + \
            u'version of the package is different due to the inclusion of ' + \
            u'a number of necessary exe files.\n\nTo fix the SFTP package ' + \
            u'so that it may run properly, please run "Remove Package" and ' + \
            u'then reinstall it using the "Install Package" command.\n\nTo ' + \
            u'learn how to properly sync packages across different machines, ' + \
            u'please visit https://sublime.wbond.net/docs/syncing')
示例#2
0
def plugin_loaded():
    if need_package_control_upgrade:
        sublime.error_message(u'SFTP\n\nThe SFTP package seems to have been ' + \
            u'installed using an older version of Package Control. Please ' + \
            u'remove the SFTP package, upgrade Package Control to 2.0.0 ' + \
            u'and then reinstall SFTP.\n\nIt may be necessary to delete ' + \
            u'the "Packages/Package Control/" folder and then follow the ' + \
            u'instructions at https://sublime.wbond.net/installation to ' + \
            u'properly upgrade Package Control.')
        return

    settings = sublime.load_settings('SFTP.sublime-settings')

    try:
        # This won't be defined if the wrong version is installed
        sftp_debug.set_debug(settings.get('debug', False))
    except (NameError):
        pass

    bin_folder = os.path.join(os.path.dirname(os.path.abspath(__file__)),
                              'bin')
    has_bin = os.path.exists(bin_folder)
    psftp_exe = os.path.join(bin_folder, 'psftp.exe')
    has_psftp = os.path.exists(psftp_exe)
    if os.name == 'nt' and (not has_bin or not has_psftp):
        sublime.error_message(u'SFTP\n\nThe SFTP package seems to have been ' + \
            u'synced or copied from an OS X or Linux machine. The Windows ' + \
            u'version of the package is different due to the inclusion of ' + \
            u'a number of necessary exe files.\n\nTo fix the SFTP package ' + \
            u'so that it may run properly, please run "Remove Package" and ' + \
            u'then reinstall it using the "Install Package" command.\n\nTo ' + \
            u'learn how to properly sync packages across different machines, ' + \
            u'please visit https://sublime.wbond.net/docs/syncing')
示例#3
0
    if need_package_control_upgrade:
        sublime.error_message(u'SFTP\n\nThe SFTP package seems to have been ' + \
            u'installed using an older version of Package Control. Please ' + \
            u'remove the SFTP package, upgrade Package Control to 2.0.0 ' + \
            u'and then reinstall SFTP.\n\nIt may be necessary to delete ' + \
            u'the "Packages/Package Control/" folder and then follow the ' + \
            u'instructions at https://sublime.wbond.net/installation to ' + \
            u'properly upgrade Package Control.')

if sys.version_info < (3,):
    plugin_loaded()


try:
    # This won't be defined if the wrong version is installed
    sftp_debug.set_debug(settings.get('debug', False))
except (NameError):
    pass


hook_match = re.search("<class '(\w+).ExcepthookChain'>", str(sys.excepthook))

if not hook_match:
    class ExcepthookChain(object):
        callbacks = []
        names = {}

        @classmethod
        def add(cls, name, callback):
            if name == 'sys.excepthook':
                if name in cls.names:
示例#4
0
    if need_package_control_upgrade:
        sublime.error_message(u'SFTP\n\nThe SFTP package seems to have been ' + \
            u'installed using an older version of Package Control. Please ' + \
            u'remove the SFTP package, upgrade Package Control to 2.0.0 ' + \
            u'and then reinstall SFTP.\n\nIt may be necessary to delete ' + \
            u'the "Packages/Package Control/" folder and then follow the ' + \
            u'instructions at https://sublime.wbond.net/installation to ' + \
            u'properly upgrade Package Control.')


if sys.version_info < (3, ):
    plugin_loaded()

try:
    # This won't be defined if the wrong version is installed
    sftp_debug.set_debug(settings.get('debug', False))
except (NameError):
    pass

hook_match = re.search("<class '(\w+).ExcepthookChain'>", str(sys.excepthook))

if not hook_match:

    class ExcepthookChain(object):
        callbacks = []
        names = {}

        @classmethod
        def add(cls, name, callback):
            if name == 'sys.excepthook':
                if name in cls.names: